Warning: Constant WP_ENVIRONMENT_TYPE already defined in \Local Sites\meponetv1\app\public\wp-config.php on line 85

huangapple go评论57阅读模式
英文:

Warning: Constant WP_ENVIRONMENT_TYPE already defined in \Local Sites\meponetv1\app\public\wp-config.php on line 85

问题

我刚刚在几天后通过本地WP启动了网站,然后出现了这个警告。
我还没有更新本地WP。
我除了主题之外,没有更改任何代码。
我没有添加任何插件。
警告显示在网站和wp仪表板上。

英文:

I just started the site through Local WP after a few days and this warning shows up.
I havent updated Local WP.
I havent changed any code except my theme.
I haven't added any plugins.

The warning is showing on bothe the website and the wp-dashboard

答案1

得分: 1

你的网站已经定义了 WP_ENVIRONMENT_TYPE 常量。请搜索你的代码库以查找该常量(应该有两个定义),然后移除其中一个或者在其前面加上一个检查。

defined( 'WP_ENVIRONMENT_TYPE' ) || define( 'WP_ENVIRONMENT_TYPE', '' );

如果只有一个结果,那么建议更新本地的 WP:最近的版本将常量定义从内部引导移到了 wp-config.php 中。然后你可以决定使用哪个定义。

英文:

Your site has WP_ENVIRONMENT_TYPE constant defined. Search your codebase for that constant (there should be two definitions), and remove one or prefix it with a check

defined( 'WP_ENVIRONMENT_TYPE' ) || define( 'WP_ENVIRONMENT_TYPE', '' );

If there's only one result, then recommend updating Local WP: a recent version moved the constant definition from internal bootstrap into wp-config.php. Then you can decide which definition to use.

huangapple
  • 本文由 发表于 2023年6月19日 23:06:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76507900.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定