v0.2 Alpha

/

/

Enable WordPress Debugging

Enable WordPress Debugging

Last Modified: August 14, 2024
(Rev. v2.0)
by Ryan T. M. 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.

Article Overview

This guide will walk you through how to enable debugging in WordPress to troubleshoot issues with installation and view the debugging logs from the WordPress core and the plugins you have installed.

On this page

Topics Discussed

Is this article helpful?

Voting Coming Soon.

Share this article

Send to Team Member