Wordpress widgets are disappearing in admin area Wordpress widgets are disappearing in admin area wordpress wordpress

Wordpress widgets are disappearing in admin area


this is the solution.

we just need to change the id of sidebar. id should be only in small letters. Caps are not allowed. if we use cap id in any of the sidebar, the problem occurs in the same sidebar or any other sidebar of automatically removing widgets on refresh.

I am just mentioning an example below.

This is the Wrong Pattern -

register_sidebar( array(        'name' => __( 'Main Sidebar', ),        'id' => 'Sidebar-1',        'before_widget' => '<aside id="%1$s" class="widget %2$s">',        'after_widget' => "</aside>",        'before_title' => '<h3 class="widget-title">',        'after_title' => '</h3>',    ) );

This is the right pattern. Note i just changed the id to correctly configure the widgets saving.

register_sidebar( array(        'name' => __( 'Main Sidebar', ),        'id' => 'sidebar-1',        'before_widget' => '<aside id="%1$s" class="widget %2$s">',        'after_widget' => "</aside>",        'before_title' => '<h3 class="widget-title">',        'after_title' => '</h3>',    ) );

Secondaly, wordpress has not mentioned anywhere, that id should be in small letters, this is another bug by wordpress. But in such big cms, these things are bound to happen.


I got the same issue after I changed the sidebars ids (in register_sidebar)

The sidebars show in admin part, I can change their content, which is reflected in front end, but refreshing admin page displays empty sidebars (and saving reflects empty sidebars in front end)

I could solve it by removing the sidebars (remove the calls to register_sidebar), updating admin page, which suddenly showed all the widgets in inactive widgets list (a lot of them since I put new widgets many times before solving the issue), and re-activating the calls to register_sidebar.


I had the same issue and solved it by modifying the name of the widget to lower case as per the best solution here. i experienced this issue on 3.6