说明:刚搭建了个wordpress博客玩玩,上传主题后,发现在外观-主题那里只能看到现在使用中的主题的预览图而看不到其它的,但是已经安装的主题都在,使用的环境是军哥的LNMP1.4,百度一下后发现可能的原因就是php已禁用scandir函数,而军哥的LNMP从0.9版本开始禁用了scandir函数,导致了wordpress无法缓存主题列表。所以后台无法显示安装好的wordpress主题,只显示当前使用的一个主题。解决方法就是把禁用的scandir函数恢复就可以了。
方法
修改php.ini解决,这里用的是军哥lnmp,文件位置/usr/local/php/etc。
disable_functions=passthru,exec,system,chroot,scandir,...
删掉scandir,字样,再重启php即可:/etc/init.d/php-fpm restart。
![[教程]Cursor和VSCode无法写入用户设置 请打开用户设置并清除错误或警告,然后重试](https://www.aiwanba.net/wp-content/themes/Git-alpha/timthumb.php?src=https://www.aiwanba.net/wp-content/themes/Git-alpha/assets/img/pic/12.jpg&h=110&w=185&q=90&zc=1&ct=1)
![[教程]17 个全球最佳免费虚拟电话号码(手机、WhatsApp)](https://www.aiwanba.net/wp-content/themes/Git-alpha/timthumb.php?src=https://www.aiwanba.net/wp-content/themes/Git-alpha/assets/img/pic/3.jpg&h=110&w=185&q=90&zc=1&ct=1)
![[教程]安装.Net Framework 4.8 时出现未安装成功](https://www.aiwanba.net/wp-content/themes/Git-alpha/timthumb.php?src=/image/https://img-blog.csdnimg.cn/20210603091820696.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2d1eXVlbGluMTIz,size_16,color_FFFFFF,t_70#pic_center&h=110&w=185&q=90&zc=1&ct=1)
![[教程]Win7 安装.net Framework 4.8失败,提示:已处理证书链,但是在不受信任提供程序信任的根证书中终止。](https://www.aiwanba.net/wp-content/themes/Git-alpha/timthumb.php?src=https://lexsion.com/usr/uploads/2020/03/1453062917.jpg&h=110&w=185&q=90&zc=1&ct=1)