EN / ZH
Fixing WordPress Dashboard Showing Only One Theme Under LNMP

The reason WordPress fails to recognize themes is that the server environment has disabled the scandir function, preventing WordPress from properly caching themes.

How to fix the theme recognition issue under LNMP:

  1. Locate php.ini — it’s typically found in the /usr/local/php/etc directory on the server.
  2. Open php.ini, search for “disable_functions”, find and remove “scandir” from the list that follows, then save the file.
  3. Restart the PHP service on your server for the changes to take effect.