Problem: Something is wrong – I added a new widget to those already in place – and when I selected to “save changes”, one or more of the widgets disappears! What happened? What did I do wrong? Can it be fixed?

For me, this problem surfaced on a WordPress 2.7 install when changing the site url from a “non-www “to a “www” url in the general settings. Apparently, this gave a signal to our WordPress install that the theme I was using was a newly selected theme. And because widgets are not transferred from one theme to the next theme automatically, (different themes are coded with widgetized areas and sidebars in unique ways for instance), the widgets were now acting in a strange and unpredictable way – as an apparent result of my changing the url of the site. Others have reported similar issue for various reasons. What a relief to find that there is a solution.

Save My Widgets!

Save My Widgets!

In the scenario I was in today, we had over 20 widgets, specific logic for most of them (Widget Logic plugin), widget-specific css, html, forms, etc., and the site was live. HELP!!

So, if you feel like screaming because widgets are disappearing left and right. STOP! Don’t wait for another one to vanish into thin air. The sun will still rise tomorrow… smile at the fact that a widget got to you… well it may not be a laughing matter? Laugh anyway ;-D

After digging for answers here are the steps that worked for me:

  1. Backup your WordPress database (never hurts!)
  2. Download and install Justin Tadlock’s “Widget Reset” plugin. (Don’t run it yet – just install)
  3. In Firefox open a new tab and navigate to each Widget Section in your WordPress dashboard, i.e. sidebar-1, sidebar-2, etc., etc.
  4. In a separate tab run the reset process (see the readme in the plugin)
  5. At this point all widget data is erased and a complete clean slate is ready for widgets to be created – without being dropped at random. Here is what saved the bacon for me with loads of data in widgets that I did no care to lose:

  6. Visit each tab you opened earlier with the previously existing widget content still in place and choose to “save changes”

We lost three widgets before we went through the above process. And in the end, only three – which were rebuilt through the help of text files and screen shots. I am told this will not be as much an issue in 2.8. I am curious to see the change and how widgets are handled. What changes will be required for a theme to be 2.8 ready?

In the mean time I will sleep a little better having reaped the benefits of the WordPress community, Justin’s plugin, a backup of sorts and Firefox. Did I miss an easier solution? Let me know!

More content you may find helpful:
  1. Scrapper’s Guide on WordPress
  2. Back Up Your WordPress Website
  3. Send a PDF using your WordPress website and email list

Tags: , ,

4 Responses to “Disappearing Widgets – A Solution in WordPress 2.7”

  1. Sarah Flashing 25. May, 2009 at 7:49 am #

    This widget is great, it installs easy to reset my widgets, however it didn’t fix the widgets that “disappeared” as they were moved around in the wp admin section yet continue to appear on the site. I’ve tried to remove them through phpmyadmin to no avail. Any suggestions?

    • tGriff 25. May, 2009 at 3:51 pm #

      Sarah,

      Once you’ve run the widget reset there will be no widgets on your site. The only reason I can imagine that you are seeing them on the site is if you have a caching system/plugin installed. PHPMySQL would not be needed after running widget reset – there is no data left in the widgets area, it has been reset.

      Make sure you actually ran the reset after installing. If you still see widget data on the site turn off or delete any cache plugin, empty your browser cache etc.

      Thanks for taking a moment to leave your response! (P.S. No site visible on the url you left with your comment??)

  2. Bill Courtney 14. Jun, 2009 at 4:28 am #

    I do not think it is handled much better in 2.8 since I just lost all my widgets. They disappeared not only from my home page but my widget edit page as well.

    • tGriff 26. Jun, 2009 at 12:38 am #

      Ughh! That sounds disappointing! I held my breath on one site and started breathing again once I saw the “non-active” widgets section – a new section on the 2.8 widgets admin panel. Is that what happened in your experience? Or did they just completely vanish. Have you had a repeat of the above?

      Overall I’d rate 2.8 much better. This has been one of the bigger “Oh NOOO!” experiences for me with 2.7 and I am grateful it is being addressed.

      Love the gravatar by the way!