WP Debug Toolkit 1.2.0 is LIVE. Get $300 discount on the lifetime deal now
Use Discount Code WPDTLTD

By default, WordPress writes errors to wp-content/debug.log and WP Debug Toolkit (WPDT) reads from the same path. If your site uses a different log location — due to a custom WP_DEBUG_LOG value, hosting provider conventions, or server configuration — you can configure WPDT to read from that path instead.

Default path

When WP_DEBUG_LOG is set to true (not a string path), WordPress writes to:

wp-content/debug.log

WPDT reads this path by default with no additional configuration.

When WordPress uses a different path

Custom WP_DEBUG_LOG path

WordPress supports setting WP_DEBUG_LOG to a file path instead of true:

define( 'WP_DEBUG_LOG', '/home/user/logs/debug.log' );

When set this way, WordPress writes errors to the specified file. WPDT detects this value and reads from the same location automatically.

Host-managed locations

Some hosting providers store logs in non-standard locations:

  • GridPane — uses /logs/debug.log or a similar path within the site’s log directory
  • Managed WordPress hosts — may redirect error output to their own log aggregation systems

If your host writes debug.log to a custom directory, you need to tell WPDT where to find it.

Server-level PHP error logs

Server-level PHP error logs (typically in /var/log/) are separate from WordPress debug.log. These logs capture errors from all PHP processes on the server, not just WordPress. WPDT reads WordPress debug logs, not server PHP error logs.

Configuring custom paths in WPDT

Admin UI

Go to Settings > Viewer Settings > File Paths Configuration. Enter the full absolute path to your log file. WPDT validates that the path exists and is readable before accepting it.

DBTK_LOG_PATH constant

Define the DBTK_LOG_PATH constant in wp-config.php to set the log path at the code level:

define( 'DBTK_LOG_PATH', '/home/user/logs/debug.log' );

This constant takes priority over the path set in the admin UI.

DBTK_CONFIG_PATH constant

If your wp-config.php is not in the standard location (one or two directories above wp-content/), define DBTK_CONFIG_PATH so WPDT can find it:

define( 'DBTK_CONFIG_PATH', '/home/user/config/wp-config.php' );

This is relevant when WPDT needs to read or write debug constants to wp-config.php.

Resolution order

WPDT resolves the log file path in this order:

  1. DBTK_LOG_PATH constant (if defined)
  2. Custom path stored in the WordPress options table (set via Settings > Viewer Settings > File Paths Configuration)
  3. WP_DEBUG_LOG value (if set to a string path)
  4. Default: wp-content/debug.log

The first match wins. If DBTK_LOG_PATH is defined, the admin UI setting and WP_DEBUG_LOG value are ignored for path resolution.

Path validation

WPDT validates the log path before accepting it:

  • The file must exist on the filesystem
  • The file must be readable by the PHP process
  • The path must pass security checks (no path traversal, no blocked filenames)

If validation fails, WPDT rejects the path and falls back to the next option in the resolution order.

Viewer integration

The custom log path is written to the viewer’s config.php file during installation or repair. The standalone viewer reads this config.php to locate the log file — it does not query WordPress options at runtime.

If you change the log path after the viewer is already installed, the viewer continues reading from the old path until you update it. To apply the new path:

  1. Go to the admin dashboard
  2. Repair or reinstall the viewer

This copies the current log path into the viewer’s config.php.

On this page
Try WP Debug Toolkit
The best error log viewer with amazing developer tools to help you troubleshoot your WordPress site securely and efficiently. Something something more.