How to make WordPress display PHP errors

Your site is down just displaying “This site is experiencing technical difficulties” and you need to investigate what is causing the error. If you turn on PHP error reporting at your hosting provider, WordPress still just displays the generic message.

Turn on PHP error reporting at your hosting provider.

Edit the wp-config.php file and comment out the line define( ‘WP_DEBUG’, false );

// define( 'WP_DEBUG', false );

Then add the following lines and make sure they occur before the line /* That’s all, stop editing! Happy blogging. */

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
@ini_set( 'display_errors', 1 );

When you are done, remember to revert the above changes.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

3 × five =