Solve Problem of No Themes Show Up in Themes Page of WordPress

After upgrading to WordPress 3.4, there are no themes show up in section Available Themes on page of Manage Themes in my WordPress Dashboard. And I get no response from WordPress support forum when asking for help. Finally, I figure out how this happens and success to fix it today.

In short, if the function of scandir of PHP is disabled on the server, this problem occurs. Because the WP_Theme class introduced in WordPress 3.4 uses this function to detect all the themes available in /wp-content/themes/ folder.

No available themes show up on Manage Themes page

If WP could not detect themes in this folder, the following warning would show up on Themes page in the Dashboard:

You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress.org Theme Directory at any time: just click on the Install Themes tab above.

And of course I have at least themes of Twenty Eleven and Twenty Ten in this folder. Normally, the Manage Themes page looks like:

Default Manage Themes page of WordPress

I’m using a VPS from Linode right now. After setuping a LAMP server manually, I optimized the server following some tricks from search results. And there is a trick saying that I should disable some PHP functions to protect the server. So I edited /etc/php.ini file in line of about 386, added some functions to the right of disable_funcions = . scandir is one of these functions.

If you have the same problem, you could give it a try. Just remove scandir from the line of disable_funcions = and restart httpd service:

service httpd restart

or reboot your system.©

本文发表于水景一页。永久链接:<http://cnzhx.net/blog/solve-problem-of-no-themes-show-up-in-themes-page-of-wordpress/>。转载请保留此信息及相应链接。

2 条关于 “Solve Problem of No Themes Show Up in Themes Page of WordPress” 的评论

雁过留声,人过留名

您的电子邮箱地址不会被公开。 必填项已用 * 标注

特别提示:与当前文章主题无关的讨论相关但需要较多讨论求助信息请发布到水景一页讨论区的相应版块,谢谢您的理解与合作!请参考本站互助指南
您可以在评论中使用如下的 HTML 标记来辅助表达: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>