解决WordPress在新建页面无法选择主题页面模板 WordPress无法识别主题 | 客家网络

其他杂项25字数 504阅读1分40秒阅读模式

WordPress在新建页面时候无法选择主题的模板,相信很多wp爱好者都有遇到过这种问题,之前还以为是wordpress的问题,重装就完事了。今天碰到了才想起一个在PHP.ini中的一个函数:scandir。原因就在这个函数!

是否在网站迁移的时候碰过过这个问题?如下图,有问题的是无法在页面属性中选择模板的!

网络上也有相关文章,天下文章一大抄啊!!!意思是没有指定 Template Name,怎么可能。美帝的模板怎么可能没有指定Template Name。

打开php.ini配置文件,找到

disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server

把scandir删除!重启web服务器,完美解决问题!

WordPress无法识别主题也是这个原因!!!wordpress没办法扫描目录。

 
  • 本文由 asdfasd 发表于 2025-02-1313:22:30
  • 转载请务必保留本文链接:http://wp.fangfa.me/other-note/%e8%a7%a3%e5%86%b3wordpress%e5%9c%a8%e6%96%b0%e5%bb%ba%e9%a1%b5%e9%9d%a2%e6%97%a0%e6%b3%95%e9%80%89%e6%8b%a9%e4%b8%bb%e9%a2%98%e9%a1%b5%e9%9d%a2%e6%a8%a1%e6%9d%bf-wordpress%e6%97%a0%e6%b3%95%e8%af%86.html