Enable WordPress Debugging

Created by Ryan Reiffenberger, Modified on Mon, 6 May at 10:08 AM by Ryan Reiffenberger

Sometimes you need to troubleshoot issues with your WordPress installation. To do this, WordPress offers a 'debugging' mode which will output the contents of your error log to the screen. To disable debugging, simply follow the steps below, and change Step #3 to 'OFF'.


It is not recommend that this be enabled in PRODUCTION as your visitors may be able to see error messages and/or sensitive information. We recommend making a copy of your website first to staging and performing your troubleshooting activities there first.


Activate Debugging With WP Toolkit

  1. Log into cPanel 
  2. On the left-hand menu, click WP Toolkit
  3. Find the WordPress site you want to enable Debugging for, and toggle Debugging to On

Activate Debugging via The 'wp-config.php' File

This guide is more advanced and if done incorrectly can cause issues with your WordPress installation. We recommend trying the method above first if you haven't already.
  1. Log into cPanel 
  2. Go to the File Manager
  3. Browse to the 'public_html' directory, and find the appropriate 'wp-config.php' file for your installation. If you're modifying staging, you may want to look in the 'staging' directory, or whatever directory you set up during the staging process to house your WordPress installation. Right-click on the file, and click Edit
  4. Find the section of your config file that says:
    /* Add any custom values between this line and the "stop editing" line. */
    
    
    /* That's all, stop editing! Happy publishing. */
  5. Enter in the lines:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', true );
    @ini_set( 'display_errors', 0 );
  6. After making the changes to your file, click Save Changes
  7. If you want to reverse this process, simply follow all of the steps up to #5, and then remove the lines in step 5 from your config file, and save.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article