DEV Community

Cover image for WordPress debug.log Has Two Problems
Christian Ahrweiler
Christian Ahrweiler

Posted on

WordPress debug.log Has Two Problems

But the default debug.log can create two very practical problems.

First: size.

When WP_DEBUG_LOG is enabled, WordPress can write notices, warnings, errors and deprecated messages into /wp-content/debug.log. On a noisy site, this file can grow fast. A few repeated notices can quickly become megabytes of log data.

Second: visibility.

 The default filename is predictable. If the server is not configured carefully, /wp-content/debug.log may be reachable from the browser. That can expose internal paths, plugin names or technical details that should not be public.

atec Debug by atec Plugins fixes both issues in a smarter way.

Instead of using the predictable default file, it can move the log to an unguessable path like:

wp-content/atec-debug-{token}.log

The token is based on the site's AUTH_KEY, and existing debug.log setups can be migrated automatically.

It also helps keep the log readable by filtering PHP notices and deprecations while keeping warnings and errors visible.

Top comments (0)