最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Enable errors PHP Wordpress 5.2

programmeradmin0浏览0评论

Since Wordpress 5.2 can not display errors on the site. The constants "WP_DEBUG" et "WP_DEBUG_DISPLAY" doesn't work. The following message is always displayed : "The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."

Have you solution?

Since Wordpress 5.2 can not display errors on the site. The constants "WP_DEBUG" et "WP_DEBUG_DISPLAY" doesn't work. The following message is always displayed : "The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."

Have you solution?

Share Improve this question asked Jun 25, 2019 at 10:23 DalekDalek 234 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 4

You can disable this behaviour by setting WP_DISABLE_FATAL_ERROR_HANDLER to true:

define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );

This will stop the "The site is experiencing technical difficulties" message from appearing, so errors will appear as they did prior to this feature being added.

Maybe I am wrong here, but define( 'WP_DEBUG', true ); is still available and works in installs 5.2 and after.

According to WordPress docs: https://codex.wordpress/WP_DEBUG

Starting with WordPress version 2.5, setting WP_DEBUG to true also raises the error reporting level to E_ALL and activates warnings when deprecated functions or files are used; otherwise, WordPress sets the error reporting level to E_ALL ^ E_NOTICE ^ E_USER_NOTICE.

Edit: Here is how things play out in the back end. https://core.trac.wordpress/browser/tags/5.2/src/wp-includes/load.php#L321

There is nothing in there that says it is deprecated or being removed. And that error reporting level are set correctly.

I just tested it in my environment by setting WP_DEBUG to true inside of the wp-config.php file. And it gave the same The site is experiencing technical difficulties. Please check your site admin email inbox for instructions message, but also gave me the syntax error I put into my site to test and break it. I am running PHP 7.2

I have checked this code on WordPress 5.2 define( 'WP_DEBUG', true ); and it is perfectly working. I think you should reinstall the WordPress.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论