WordPress – Unavailable Widget Control in Admin Panel – Problem

I ran into a serious problem tonight, a recent change that was made to a clients site caused a traffic lose and so they restored the site back to a previous database and theme. When you change the theme with the widgets enabled there is a chance you will not gain access to the sidebar widget control from the WordPress Dashboard.

So not knowing how to get the sidebars back under control from the dashboard. I dove into the database to figure out how the active widgets are stored in the database. It didn’t take long for me to find that the Options Table has a record for all of the widgets and which ones are active and which sidebar they belong to.

Record number 82 in the Options Table is where this data is stored in my database. Here is an image of that record:

wordpress options table widget record

Once I found the record I clicked on the pencil to edit that record. In there I found all the data I needed to disable the widgets I needed. Here is the data that was in the options_value field of record 82.


The registered sidebars are identified by sidebar-1 and sidebar-2. Immediately following the sidebar identifier is an a:2 for both of my sidebars. The number 2 identifies how many widgets are in that sidebar. The widgets that are in the sidebar are contained between the {}, brackets.

So to remove all of the widgets make the widget count to 0 and remove all data between the {}, brackets:

To remove only one widget from the sidebar, reduce the widget count by 1 and remove all of the data for the preceding i all the way to the ;
*notice I changed the widget count from 2 to a 1 and I removed the categories widget from inside the brackets

The complete code for the options_value field with no active widgets for both registered sidebars would look like this:


I made some mistakes when editing the data in this record and when I did so. WordPress created a new sidebars_widgets record. This will cause you to not see any further changes to the original record. You will need to navigate to the last record in the options table and remove the new sidebars_widgets record then make the proper corrections to the original record.

The problem with the Admin Control of the widgets is not resolved at the moment. And the solution is unknown. All I was able to do for my client was remove the unwanted widget which surfaced this problem in the first place. I now have a better understanding of how the widget control is stored in the database and I hope to sort this issue out soon.

Look for a future post on the resolution of this problem or drop me a line if you have any info or feedback.

Leave a Reply

Your email address will not be published. Required fields are marked *