迁移后出现WordPress PHP错误 - 致命错误:无法重新声明之前声明的内容

时间:2017-10-19 15:36:03

标签: php wordpress

我很难弄清楚这里发生了什么。我已经迁移了一个WordPress安装,在遇到数据库的一些问题之后,我遇到了这个错误 -

Fatal error: Cannot redeclare theme_register_required_plugins() 

(previously declared in /home/cluster-sites/2/u/union-st.org/public_html/wp-content/themes/zeyn_child_theme/functions.php:26) in /home/cluster-sites/2/u/union-st.org/public_html/wp-content/themes/zeyn/functions.php on line 175

我尝试在if语句中包装有问题的代码行,但似乎没有效果。

此外,子主题functions.php文件中甚至没有26行代码(也没有theme_register_required_plugins()的另一个实例。

当我重命名两个functions.php文件(有效地阻止它们被读取)时,错误仍然存​​在......我似乎能够影响错误的唯一方法是重命名wp-includes文件夹,这表明问题可能在那里。

顺便说一下,我是PHP的新手。谢谢你的时间:))

感谢您的帮助。

0 个答案:

没有答案