WP_Debug
is a constant (a permanent global variable) that when enabled will display any PHP errors on the front-end of your site.
WP_Debug
is the most useful tool when troubleshooting your site for any potential errors or warnings. If disabled and your site has an error you may see a blank white screen or content missing on the site but no error message, that makes it nearly impossible to figure out what the problem exactly is.
Enable via a plugin
In case you are looking for a one-click method or you are not comfortable with editing a file using FTP or SFTP access in general simply use the following to turn on WP_DEBUG
mode instead.

- Log into your WordPress website and navigate to Plugins » Add New.
- Locate the search field in the top right corner of the page and type in SO Turn On Debug.
- Click Install Now button.
- Then, click Activate button.
- Upon activation of the plugin,
WP_DEBUG
will be set toTRUE
in your site.
Note that debugging is used for development purposes only. So make sure to disable it again after you are done troubleshooting.
Enable via FTP or SFTP
Follow the steps below to enable WP_Debug
for your WordPress installation:
- Access your website’s root folder via FTP or SFTP.
- Locate the
wp-config.php
file. - Open this file in any text editor.
- Search for
WP_Debug
and if you find it set the value toTRUE
if currently set toFALSE
. - If you didn’t locate
WP_Debug
scroll down near the bottom of the file and add the following code right before the line that saysThat's all, stop editing! Happy publishing
.
define( 'WP_DEBUG', true );
The true
value in the line above is not set in apostrophes (')
because it is a Boolean value.
Last updated: 3 years ago