WP_Debug is a built in debugging tool that when enabled, will display any PHP errors on the front-end of your WordPress website. This tool is ideal for debugging the infamous WordPress white page of death and other coding related issues.
In this quick and easy guide, we will show you how to enable the WP_Debug feature and output the results to a log file.
1. Navigate to your wp-config.php file located in the domains root folder. This can be found through your FTP Client.
2. Open the wp-config.php file and add
For ease, I have put mine just below
It should now look like this:
3. Now go to your website. If any errors are being generated, then they will show at the top of the page. See the example image:
Another handy tool is WP_DEBUG_LOG, which can be used in conjunction with WP_DEBUG to save all error messages to a debug.log file located in the /wp-content/ directory of your site.
Now you can easily see these errors, you can then go about fixing them.
WP_DEBUG is the go to debugging tool for WordPress and will display all errors, notices and warnings.
We’ve covered the basic debugging and outputting the results to log file in this post but for the full functionality of the WP_DEBUG feature please see the WordPress codex.