The WordPress 4.8 text widget will destroy your content

Published 14 Jun 2017 in HTML & CSS, Opinion, WordPress by ZigPress

I just completely lost the contents of a text widget, and it was WordPress’s fault.

I had a normal, old-style text widget, containing a set of links, and within each link was a FontAwesome icon tag, so that when the widget displayed on the site, you would see a set of icons, each one linking to a different URL.

After upgrading the site to WordPress 4.8, I wanted to remove one of the icons from the widget. So I went to Admin > Appearance > Widgets as normal, and lo and behold, the text widget had now converted into a WYSIWYG editor widget (though still very misleadingly called a text widget), as was announced in the WordPress 4.8 release notes. I was aware that this would be the case…

However, on visual mode, the widget showed no content at all (because I had not needed to enqueue FontAwesome for WordPress admin in my theme files), and on switching to text mode, the link tags had been somehow stripped, leaving just the <i> tags of the FontAwesome icons.

Yes, WordPress destroyed my content.

I immediately installed the new third party Classic Text Widget but still had to rebuild the link tags for each icon.

Thinking about this, the ONLY way I could have recovered the full content of my old text widget would have been to go into the database and extract the serialised content from the options table before loading the admin widget screen.

This is not acceptable, and I don’t think I need to say that WordPress should have left the normal text widget as it was and created a separate WYSIWYG widget with a new name instead. What happened to the backward compatibility that they’re always bleating about?

This is WordPress’s first backward step in quite a while, but jeez it’s a big one. Someone in the WordPress core team seriously messed up and they should be called out on their idiotic decision.

So beware: if you’re a heavy text widget user, and you use them for HTML markup precisely because they don’t mess with it, WordPress 4.8 will try to break your sites. I would advise getting used to extracting the serialised widget instance content directly from your databases and then converting them all to Classic Text Widgets. You may also need to edit your CSS since the Classic Text Widget has a different class to the old text widget.


  1. On 15 Jun 2017 at 03:11, Jack said:

    Screwed up a bunch of subscription boxes on client sites. Destroyed formatting and stripped code. I had to revert – thank goodness I had backups!

  2. On 15 Jun 2017 at 19:24, Jim Walker said:

    Yes, there are some heated discussions on this in a couple of Facebook forums as well:

    Advanced WordPress

    Genesis WordPress

  3. On 15 Jun 2017 at 20:39, Karen said:

    This is just awful. I’m glad to know about it ahead of time at least. So, would this be a reasonable approach? Go through all my sites and assess what, if anything, I have in text widgets. Make a copy of what’s there. Update to 4.8 and assess damage. Install Classic Text Widget and recreate my content as needed using my saved copy. This will take quite a lot of time to go through so many sites and deal with this. Is there ANY chance they will fix this in an upcoming minor release? This makes no sense at all!

  4. On 15 Jun 2017 at 21:02, Alan Fuller said:

    Sorry I was a bit slow refining my plugin, which should avoid such grief. It basically reverts the widget ( with an option to turn on visual editor ONLY is you want it )

  5. On 21 Jun 2017 at 22:46, Luke Cavanagh said:

  6. On 11 Jul 2017 at 20:51, Clint said:

    Thanks, explains what happened to me. Such a mess to clean up.

  7. On 21 Jul 2017 at 00:26, Ben Lacey said:

    Hi Andy,
    It was nice reading your opinions on the 4.8 update but I must admit I am a bit on the fence with this one. To be sure the new WYSIWYG editor widget didn’t cause conflicts or data loss they could have created a separate widget type.

    The editor for all posts, pages and post types remains the same throughout so it only makes sense that the introduction of HTML enabled widgets follows this design and implementation.

    The issue you faced was due to WordPress stripping empty spans and divs. Whenever I use Bootstrap icons in a widget area I use a shortcode that returns the markup so [icon code=”fa fa-phone fa-3x”] which would return .

    A quick and dirty approach would be to add HTML comments: . I appreciate solutions to the problem you faced are irrelevant now but WordPress could have done things better but before every update they do say to backup your website database and files before proceeding.

  8. On 24 Jul 2017 at 18:39, Jim Walker said:

    Many of the issues are simply due to “forced implemenation of new features.

    I mean any new major feature should be “off” by default, with a toggle to enable.

    Doesn’t take a genius to figure out that this approach is a solution and doesn’t require anything more than a check box.

    If the feature turns out to be without issues, “then” in future versions set to “on” by default.

    Seems to be a lot of hubris in the WordPress core crowd – “you will get my new features and you will like it…”

    Why does it have to be that way?


    It could be argued, “Well, you are not helping to build out updates and core features and you didn’t test the beta – so who are you to talk bud!”

    Well, geez, historically speaking, if you haven’t learned by now that auto “on” new features in updates are a bad idea, then I don’t know what to say. Add a toggle, with off being the default. How hard could it be…

  9. On 02 Aug 2017 at 15:25, Todd Sepulveda said:

    I completely agree with you….Wordpress screwed up! This has caused me some headaches!

    I’ll be trying out the classic text widget plugin.


  10. On 01 Sep 2017 at 11:25, TheAECAssociates said:

    Thank God…I had backups…! Anyway thanks for the useful information….

  11. On 15 Oct 2017 at 16:16, Sundar said:

    This just Screwed up a bunch of subscription boxes on client sites. Destroyed formatting and stripped code. I had to revert – thank goodness I had backups! This makes me remind of how important backups are.

  12. On 23 Nov 2017 at 06:08, vicky said:

    thanks for sharing such a nice post keep it up

  13. On 27 Nov 2017 at 17:16, wordpress blog themes said:


  14. On 27 Mar 2018 at 01:23, Jeff R Sullivan said:

    apparently I’m not the only one that this happened to ;)

Add a Comment

If you have used this form and would like a copy of the information held about you on this website, or would like the information deleted, please email [email protected].