从cyberpanel面板的openlitespeed环境新迁移一个网站到aapanel面板的Nginx环境,在迁移的过程顺便把一些旧版本的环境进行了升级,其中PHP从8.0版本升级到了8.3版本。
迁移过程还算顺利。
当然,这就不再提环境搭建的过程了,一把鼻涕一把泪。从1panel到aapanel再到宝塔再到aapanel。
从openlitespeed到Nginx再到openlitespeed再到Nginx,中间多少心酸,奈何实在是不成功,最后只能放弃,后面再另说吧。
在迁移后,网站其实已经可以正常访问了,但是在点击某篇具体的文章时,就会发生错误,提示网站产生了严重错误,但是首页、列表页等都正常,只有文章页错误。


然后在后台顶部还有两行错误:
Warning: Attempt to read property "labels" on bool in /www/wwwroot/yaogongzi.com/wp-content/plugins/seo-by-rank-math/includes/settings/titles/taxonomies.php on line 15 Warning: Attempt to read property "singular_name" on null in /www/wwwroot/yaogongzi.com/wp-content/plugins/seo-by-rank-math/includes/settings/titles/taxonomies.php on line 15
因此猜想这可能是rank math SEO插件可能与Taxopress冲突。
经过搜索,发现在wordpress官方社区rank math SEO插件的讨论区已经有人提到这个问题:
Warning: Attempt to read property “labels” on bool
顺着往下看,他说
If I change PHP to version 7.4, the warning message will disappear. But I don’t want to do this. Is there any good solution, please? Thank you!
此时我的php是8.3,因此猜想也可能是php错误,因此选择降级为8.2,然后前台页面全部显示正常了,但是后台其实还有这两行错误,不过暂时看起来并不影响什么,因此没有再理会了。