WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been at a loss so far and so I thought I'd pose the question: Is there a way to modify the verbosity level of the WP debug.log via wp-config.php or elsewhere?

Just an fyi, here is what I have in my wp-config.php to enable logging:


 // Enable WP_DEBUG mode
define('WP_DEBUG', true);

// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);

// Disable display of errors and warnings 
define('WP_DEBUG_DISPLAY', false);

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define('SCRIPT_DEBUG', true);

share|improve this question
up vote 4 down vote accepted

When WP_DEBUG is set, WordPress sets (via wp_debug_mode() call early in core load process) the error reporting level to E_ALL & ~E_DEPRECATED & ~E_STRICT. This means all warnings and errors except strict errors and PHP deprecated functions (not WordPress ones).

You can define your own level in a custom mu-plugin (the override needs to be called as soon as possible, but after WordPress core load). Use this page for information about the error levels you can use. An example:

error_reporting(E_ERROR | E_WARNING | E_PARSE);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.