How to Check Debug Log File on WordPress

Published on August 24, 2022 by Sebastian Moran in MainWP Blog under Tips & Tricks
Heads up: This page may include affiliate links. Read the full disclaimer.
Enable | Disable Debugging WordPress

WordPress debug logs any errors detected on your website. This is a key to finding the source of an error or learning more details about any possible errors on your site.

One issue with keeping debugging enabled on a WordPress site is that the debug.log file could grow up to 30GB or more in size resulting in eating up a lot of disk space.

This is why it is always recommended to enable debugging only when needed and disable it when done.

To enable or disable debugging in WordPress, navigate to wp-config.php file from your web hosting File Manager and look for the below lines;

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

“true” means debugging is enabled. To disable, write “false” as shown below:

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

The standard location to find the debug.log file would be within the wp-content folder.

The expected default path on the site’s server would be;

/wp-content/debug.log

Check the existing size of the debug.log file. The file can be deleted from the site’s server, which is not publicly accessible.

If the debug.log file is something you want to keep for analysis, then you will need to use an application that can open large log files on your device.

If you want to enable debugging later, the new debug.log file will be created.

If you are looking at a simple plugin to purge the debug.log file, then Debug Quick Log plugin will allow you to view log entries and purge the log from the admin bar of the site.

Ideally, debugging should not be left enabled on a production site long-term.

Useful Links

Share

Manage Unlimited WordPress Sites from One Dashboard!

  • Privacy-first, Open Source, Self-hosted
  • Easy Client Management
  • 15+ & 30 + Premium Add-ons
  • Bulk Plugins & Themes Management
Get Pro Now

Categories

Recent Posts

Search MainWP.com

[searchwp_form id="1"]