Enable errors PHP Wordpress 5.2

Since Wordpress 5.2 can not display errors on the site.The constants "WP_DEBUG" et "WP_DEBUG_DISPLAY&quo

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745371222a4624803.html

相关推荐

  • Enable errors PHP Wordpress 5.2

    Since Wordpress 5.2 can not display errors on the site.The constants "WP_DEBUG" et "WP_DEBUG_DISPLAY&quo

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信