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” 的评论

时间过去太久,评论已关闭。
如果您有话要说,请到讨论区留言并给出此文章链接。
谢谢您的理解 :-)