2

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?

2

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.

1

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.org/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.org/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

  • Codex is way outdated, so citing it for such a new functionality is probably not a good idea, as it might not get updated anymore – kero Jun 25 at 11:31
  • 1
    FWIW, the newer article doesn't mention it either: wordpress.org/support/article/debugging-in-wordpress – Jacob Peattie Jun 25 at 11:33
  • 1
    @kero, I've edited my response to also include what takes place in the backend when that constant is set. You can see that when WP_DEBUG is set to true, that it toggle error_reporting to E_ALL, which as pf PHP 5.4, will show every possible error. – ChristopherJones Jun 25 at 12:27
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.