post

Recover Deleted WordPress Widgets

Deleting WordPress Sidebar Widgets Is Simple

Late last night, I had to deactivate an offer that was on the home page announcement box because this particular offer was expiring at midnight.  The offer text was contained in a text widget that was placed in the Home Announce sidebar of one of the themes that I’m using.

To remove the offer, I simply had to open the text widget and click on the delete link.  Pretty simple right?  Well this simple exercise turned into a minor disaster!  Instead of selecting the Home Announce sidebar, I mistakenly clicked on the Welcome sidebar, which also just happened to have one text widget, which, of course, I opened and deleted!  When you click on the delete link there is no confirmation message as to whether you really want to delete.

This resulted in my home page having just the special offer from the Home Announce sidebar and… nothing else!  My entire home page content had disappeared, other than the special offer which I was trying to get rid of!

Deleting WordPress Sidebar Widgets Is… Final

After hurriedly doing some research on how to recover deleted WordPress widgets, I realized just how big this mistake really was.  Apparently there is no way to “undo” a delete of a widget from a WordPress sidebar.  My only option was to recreate.  I immediately ruled out restoring a backup because I had made several changes to another part of the website, and I did not want to lose those which I would have done with the restore option.

So my only option was to recreate the text.  What I did was typed in my TLD name in Google search and selected the “preview” mode, i.e. hovered over the two arrows to the right of the search result.  This actually showed me the entire text which had been deleted and it allowed me to copy the text.  I then pasted the text into a new text widget.  I had to put in the proper formatting tags, but that was relatively minor – at least I was able to recover the text.

Don’t (Immediately) Delete Sidebar Widgets

From now on, instead of deleting widgets from the sidebars, I recommend that you move them to the inactive widgets area.  This can be done easily with drag-and-drop from the sidebar to anywhere in the inactive widgets area as shown below: -

Recover Deleted WordPress Widgets

Have you run into this problem before, or do you have other ways you know of restoring deleted WordPress sidebar widgets?  Let me know by commenting below.

Signup to receive more quality articles, tips, and tricks for WordPress and the Genesis Framework.

About Nilesh Peshawaria

Software developer by trade, and more recently Entrepreneur. Proficient Wordpress Genesis Framework systems architect, website strategist, and affiliate marketer.
Connect with Nilesh on Google+

Comments

  1. Greg Wallace says:

    I feel your pain! I’ve done that so many times. I do as you suggest, but I rename each text widget title so I know exactly what it is without looking into the code. This has the added benefit of being a mini-repository for when you’re trying to do the same thing on another site.

Share Your Thoughts

*