How do I enable debug mode in WordPress?
This article will explain how you can enable debug mode to show any errors with your WordPress site.
Edit the wp-config.php file for your website by changing:
define(‘WP_DEBUG’, false);
to
define(‘WP_DEBUG’, true);
On the next line, enter the following:
define(‘WP_DEBUG_LOG’, true);
Save your changes.
Using an Internet browser, visit your site to trigger the debugging log.
Using your hosting account’s editor, open /wp-content/debug.log.
- Review the contents of the debug log to identify what might be causing the issue. If there are any PHP errors, you can see whether a specific plugin, theme, or configuration option is causing the problem by viewing the file path.
For example, the following error has been caused by a theme:
Fatal error: Call to undefined function functionName() in
/home/wp-content/themes/twentyeleven/functions.php on line 1
Similarly, core file errors will reference wp-admin or wp-includes in the file path:
Fatal error: require(): Failed opening required ‘/home/user/public_html/wp-includes/class-wp.php’
For more information on what each PHP error means, please read our Support article: Understanding WordPress related PHP errors
Please note: following these steps will disable the Content Delivery Network for your WordPress site. Once you have found the source of the issue, remember to set WP_DEBUG and WP_DEBUG_LOG back to false and then remove the debug.log file.