The built-in debugging feature in WordPress helps you to reveal PHP errors behind many problems such as:
- The White Screen of Death
- Internal Server Error
- Connection Timed Out
1- To enable the debugging feature, open this file wp-config.php
, and look for
define('WP_DEBUG', false);
and change it to
define('WP_DEBUG', true);
2- If you want the errors to be displayed on your website so that you can see them, add this line after the line you just edited above
define( 'WP_DEBUG_DISPLAY', true );
3- In order to enable the error logging you need to add
define( 'WP_DEBUG_LOG', true );
This will create a file called debug.log
in the wp-content
folder.