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.

Enable debugging in WordPress
  1. Log into your WordPress website and navigate to Plugins » Add New.
  2. Locate the search field in the top right corner of the page and type in SO Turn On Debug.
  3. Click Install Now button.
  4. Then, click Activate button.
  5. Upon activation of the plugin, WP_DEBUG will be set to TRUE 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:

  1. Access your website’s root folder via FTP or SFTP.
  2. Locate the wp-config.php file.
  3. Open this file in any text editor.
  4. Search for WP_Debug and if you find it set the value to TRUE if currently set to FALSE.
  5. 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 says That'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

We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies ― Learn more