Loading...

Knowledge Base

WordPress: How to Enable or Disable WP_Debug

If you receive an error on your WordPress site and are unsure about it, you can enable wp_debug mode within the website’s wp-config.php file. Enabling the debugging feature will help you identify and troubleshoot code errors in the core software, themes, and plugins. 

Managing WP_Debug Mode  

For accounts created before April 2024, please follow these steps.
  1. Launch your FTP client to connect to your hosting server. To learn how to connect to your hosting server using an FTP, visit the FTP: How to Connect Using an FTP Client article.
  2. Once connected, navigate to your site's folder (document root) and download the wp-config.php file.

    wp-config.php file

  3. Edit the wp-config.php file using a text editor, such as Notepad. 
  4. Look for the script define( 'WP_DEBUG', false );.

    Edit the wp-config.php file

  5. Change the 'false' value to 'true.' Be sure not to accidentally delete any additional characters or text, as it could cause another critical error. 
  6. Save the file after making the change. 
  7. Go back to FileZilla and re-upload the wp-config.php file you just edited. Select OK to overwrite the file.

    Overwrite the wp-config.php file

  8. Refresh your website to trigger the error codes. In the screenshot below, we can see that the error is due to a plugin called Contact Form 7.

    Sample error caused by a plugin

  9. Using your FTP client, navigate to the plugin folder and rename the Contact Form 7 (contact-form-7) folder.

    Rename the plugin folder

  10. If this is the cause of the error, breaking that connection by renaming the file should allow the site to come back without the error. 
     
  1. Log in to your Account Manager. 
  2. Click Hosting and click the MANAGE button to go to the hosting settings page.

    Hosting tab - Manage button

  3. Select Pointers & Subdomains on the left-hand menu.

    Pointers & Subdomains

  4. The next page will show you the directory or path where the WordPress files are in. Take note of the directory.

    Directory path field

  5. Navigate back to your hosting settings page and click File Manager on the left pane.

    File Manager

  6. Within File Manager, navigate to your site's folder or directory you've taken note of earlier.

    File Manager - document root

  7. Locate your site's wp-config.php, click on the three-dotted icon on the right, and then select Edit.

    Edit wp-config.php

  8. To enable WP_Debug, change the last line to: define( 'WP_DEBUG', true).

    define( 'WP_DEBUG', true )

  9. To disable WP_Debug, change the last line to: define( 'WP_DEBUG', false).

    define( 'WP_DEBUG', false)

  10. Click Save.

Are there more debugging tools?

WP_Debug is designed to work with additional tools, which are enabled in the same way as WP_Debug. 

define('WP_DEBUG_LOG', true); 
define('WP_DEBUG_DISPLAY', false); 

Learn more about WP_Debug_Log and WP_Debug_Display by visiting WordPress.org

Important: WP_Debug_Log will store records of your error messages on your hosting account. These records take up disk space, so we recommend only having it active while you are troubleshooting your website. If you leave it on for an extended period of time, you could run the risk of eventually violating our normal usage policy.

Want to learn more about WordPress?

You can always check out WordPress.org and browse their codex or online help forums.

Loading...