WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I accidentally deleted the widgets without dragging it to the inactive widgets section.

I have a backup of all the files and the database but i have changed many things on the site other than the widgets.

Can I only restore the widgets?

share|improve this question

You have to search the wp_options database table for option_name's that contains widget.

searching for widgets in wp_options table

That search results in:

search result of the query

Using the values of your backups, you'll then proceed to restore the option_value of the missing widgets. And also the value of the option of sidebars_widgets.

Goes without saying that backing up before doing this modifications is essential.

share|improve this answer
Thanks will try – asf Nov 22 '12 at 14:07
I Inserted the option_value with a new name.the widget is not showing up in the dashboard.please help – asf Dec 20 '12 at 2:22
What do you mean, new name? – brasofilo Dec 20 '12 at 17:00

Due to my impatience and lack of confidence in Hostgator's willingness to assist me with this issue, I have found a possible solution if you are comfortable looking at source code. I recommend looking up the site you wish to recover the widgets from The WayBackMachine.

share|improve this answer

Accidently deleted very essential widgets (wifi and battery) so created a new user and then copied its configuration to the older one, and IT WORKED!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.