Necessary background information: I'm working on a website which were first developped by an other web agency. So I don't have all of the history of the project.

I have an issue with a Wordpress installation: the Widgets page isn't showing in the administration menu under Appearance. If I access the page directly by typing URL (wp-admin/widgets.php) the page is showing, but I can only see a WPML widget (language selector) and a custom sidebar I've made for my theme. All the defaults WP widgets are missing.

Screen of the Widgets page

If I disable all the plugins and switch to the twentyfifteen theme the Widgets link is not showing either, and I can't even access to the wp-admin/widgets.php page - an error is showing saying that the theme isn't ready for widgets. Though twentyfifteen is supposed to register a sidebar (see twentyfifteen_widgets_init in functions.php).

So using the twentyfifteen theme with no plugins enabled I tried the following:

  • Replace all the wp-content and wp-includes files with original one, in case of they would have been altered by the other developpers.

  • Replace the twentyfifteen theme with the original one, in case of the same reason as above.

  • Enabled the WP_DEBUG mode to see if any error shows up.

But none of this help. What I can only see is that there is something in the database that is wrong. I checked the widgets options in wp_options table but it seems ok:

> select * from wp_options where option_name like '%widget%';
| option_id | option_name            | option_value                                                                                                           | autoload |
|        82 | widget_categories      | a:2:{i:2;a:4:{s:5:"title";s:0:"";s:5:"count";i:0;s:12:"hierarchical";i:0;s:8:"dropdown";i:0;}s:12:"_multiwidget";i:1;} | yes      |
|        83 | widget_text            | a:0:{}                                                                                                                 | yes      |
|        84 | widget_rss             | a:0:{}                                                                                                                 | yes      |
|        93 | widget_search          | a:2:{i:2;a:1:{s:5:"title";s:0:"";}s:12:"_multiwidget";i:1;}                                                            | yes      |
|        94 | widget_recent-posts    | a:2:{i:2;a:2:{s:5:"title";s:0:"";s:6:"number";i:5;}s:12:"_multiwidget";i:1;}                                           | yes      |
|        95 | widget_recent-comments | a:2:{i:2;a:2:{s:5:"title";s:0:"";s:6:"number";i:5;}s:12:"_multiwidget";i:1;}                                           | yes      |
|        96 | widget_archives        | a:2:{i:2;a:3:{s:5:"title";s:0:"";s:5:"count";i:0;s:8:"dropdown";i:0;}s:12:"_multiwidget";i:1;}                         | yes      |
|        97 | widget_meta            | a:2:{i:2;a:1:{s:5:"title";s:0:"";}s:12:"_multiwidget";i:1;}                                                            | yes      |
|        98 | sidebars_widgets       | a:2:{s:19:"wp_inactive_widgets";a:0:{}s:13:"array_version";i:3;}                                                       | yes      |

I checked the global $wp_registered_widgets content, and as expected it only contain the WPML widget (when enabled).

That's all I could came up with. Anyone have a tip on this on what could be checked further?

  • Corrupted WP core possibly? You could try reinstalling it. – Rarst Sep 13 '16 at 18:17
  • Is everything alright with your functions.php file? Have you tried [this][1]? [1]: stackoverflow.com/questions/17673264/… – marquito Oct 31 '17 at 10:16
  • @marquito It's been long time I do not work on this project anymore. As I said the problem occcured even when I switched back to twentyfifteen so it's not related to the theme functions.php. And this link is related to someone developping a new theme and who don't know how to register a sidebar. This is not related to this issue where the DB were corrupted (a fresh installation of WP with the old DB produced the same outcome). For the record, the company I worked with finished by giving up this project and started a new website from scratch. – vard Nov 2 '17 at 6:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.