Skip to main content

How to Disable WordPress Debugging After Troubleshooting

Disabling WordPress debugging ensures that your website does not display technical errors or internal system information to your visitors. This procedure is intended for Site Administrators who have completed troubleshooting and want to return their...

Disabling WordPress debugging ensures that your website does not display technical errors or internal system information to your visitors. This procedure is intended for Site Administrators who have completed troubleshooting and want to return their WordPress site to a standard production state.

Before you begin

You will need:

  • Administrator access to your WordPress site or the ability to edit files via FTP/SFTP or a File Manager.

  • Access to the directory where your WordPress installation is located.

Disabling the debug mode

To disable debugging, you must modify the wp-config.php file located in your WordPress root directory.

  1. Access your site's files using an FTP client or your hosting provider's File Manager.

  2. Locate the wp-config.php file in the root directory of your WordPress installation.

  3. Open the file and search for the following line: define( 'WP_DEBUG', true );

  4. Change the value from true to false: define( 'WP_DEBUG', false );

  5. If the line does not exist, add the following code block before the line that says /* That's all, stop editing! Happy publishing. */:

    define( 'WP_DEBUG', false );

  6. Save the changes to the file.

Confirm the result

To verify that debugging is disabled:

  • Refresh your website's homepage and internal pages.

  • If a non-existent page or a broken plugin causes an error, the site should now display a generic "Page Not Found" or a standard WordPress error page rather than a detailed technical stack trace.

  • You can also check your site's source code; it should no longer contain "Debug" related headers or information.

Limitations

This procedure only disables the standard WordPress debug mode. If you have installed specific plugins that have their own internal logging or debugging features, those may still be active. You must check the settings of those specific plugins if you require them to be disabled as well.

Did this answer your question?