May 21, 2026
When something goes wrong on a WordPress site, the visible symptom is often vague. A page may stop loading. A plugin may fail silently. An update may trigger a warning, or the site may simply behave differently than expected.
WordPress debug mode gives you a way to look behind the curtain.
Instead of trying to guess the cause of the issue, debug mode allows WordPress to record useful technical information about errors, warnings, and other PHP-related problems.
The key is enabling it safely. Below is a practical way to do this.
Debug mode is useful, but it should be treated like a troubleshooting tool, not a permanent setting.
Before editing anything, take a few precautions:
wp-config.php.wp-config.phpThe manual method requires access to your WordPress site files.
You can usually get there through one of these:
Look for the main WordPress folder. It is usually the same folder that contains:
wp-admin
wp-content
wp-includes
Inside that folder, find:
wp-config.php
Download a copy before editing it.
Open wp-config.php in a plain text editor or code editor.
Find this line:
/* That's all, stop editing! Happy publishing. */
Add the debug settings above it:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Save the file and upload it back to the server if needed.
These three constants work together, but they do different jobs.
WP_DEBUG
define( 'WP_DEBUG', true );
This is the main switch. When it is set to true, WordPress debugging is enabled.
WP_DEBUG_LOG
define( 'WP_DEBUG_LOG', true );
This tells WordPress to save debug messages to a log file. In most cases, that file is:
/wp-content/debug.log
WP_DEBUG_DISPLAY
define( 'WP_DEBUG_DISPLAY', false );
This controls whether debug messages are printed on the page. On a live site, false is usually the safer setting because visitors should not see raw PHP warnings or notices.
After enabling debug mode, repeat the action that caused the issue.
For example:
WordPress can only log what happens after debugging is enabled. If nothing new happens, the log may remain empty.
Now look for the log file here:
/wp-content/debug.log
If the file does not exist yet, it may mean:
When the file does contain entries, look for clues such as:
A single notice may not always explain the whole problem. But if the same plugin, theme, or file keeps appearing in the log, that is often where you should start investigating.
Once you have collected the information you need, turn debug mode off.
Change this:
define( 'WP_DEBUG', true );
To this:
define( 'WP_DEBUG', false );
You can also remove or disable the other debug-related lines if you no longer need them.
Leaving debugging enabled after you’ve finished troubleshooting is not a good habit, especially on production sites.
Editing wp-config.php is reliable, but it is not always convenient.
It also assumes you have file access, know where to place the code, and are comfortable editing a sensitive configuration file. If you manage multiple sites or troubleshoot problems regularly, that workflow can become tedious.
A plugin such as WP Debug Toolkit gives you a much more efficient way of handling debugging:

By allowing you to control the debugging process from within the WordPress dashboard, this plugin lets you:
For example, WP Debug Toolkit provides sophisticated interfaces like these for finding, viewing, and analyzing error log information:


You can also debug database errors through its Query Viewer:

The manual method is a good fit when:
Using a plugin like WP Debug Toolkit is a better fit when:
wp-config.php,Neither approach is “more WordPress” than the other. Both rely on the same basic debugging system. The right choice depends on how you prefer to work.
How can you enable WordPress debug mode?
You have two methods of doing this:
wp-config.php file and then access the debug log file on your server.Our preference is to use the plugin option, specifically WP Debug Toolkit.
For other plugins, see the 5 Top WordPress Debug Plugins.
Get maximum flexibility with unlimited licensing and domain activations.
Get your money back within 60 days of purchase, no questions asked. It's risk-free!
We offer premium support to ensure the ultimate customer experience.
For a limited time, we're offering an unlimited site license for just $199.99/year. Buy now to lock in this price.