This guide will teach you how to enable debug mode in WordPress. It helps in showing any errors with your WordPress site.
Follow the steps:
- Edit the wp-config.php file for your website by altering-
define(‘WP_DEBUG’, false); to define(‘WP_DEBUG’, true);
- On the second line, type the succeeding-
define(‘WP_DEBUG_LOG’, true);
- Save your changes.
- Visit your website to trigger the debugging log using an Internet browser.
- Open /wp-content/debug.log using the editor in your hosting account.
- Study the debug log’s contents to identify the possible cause of the problem. Any PHP errors encountered can reveal whether a specific plugin, theme, or configuration option is responsible for the problem, as indicated by the file path. For instance, the error below is attributed to a theme-
Fatal error: Call to undefined function functionName() in/home/wp-content/themes/twentyeleven/functions.php on line 1
Likewise, 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’
Please note- Adhering to these instructions will deactivate the Content Delivery Network for your WordPress site. After identifying the root cause of the problem, ensure to revert WP_DEBUG and WP_DEBUG_LOG settings to false, and subsequently delete the debug.log file.
In this way, you can enable debug mode in WordPress. If you encounter any issues, feel free to contact our support staff at your earliest.