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

When I set WP_DEBUG to true in wp-config.php, I get to see all the strict standards and deprecated messages.

I've set the error_reporting in my php.ini, ini_set() and error_reporting() to E_ERROR | E_WARNING | E_PARSE. But I still get to see the strict standards messages.

I know the messages can be useful, but they appear in some of the plugins I am using and I am not interested in seeing them. How do I disable them?

share|improve this question
up vote 3 down vote accepted

Just don’t set WP_DEBUG to TRUE. The error level is set in wp_debug_mode(), which is called in wp-settings.php before any plugins are loaded. If you leave the default values WordPress will set it to:

    E_ERROR | 
    E_WARNING | 
    E_PARSE | 

But you should keep strict standard messages on, because in some cases they advance to real errors in later PHP versions, so it is better to fix them early.

share|improve this answer

To hide strict errors you could use the solution provided by RadGH here: just put the following code in a must use plugin (a single php file under /wp-content/mu-plugins/)

   ini_set('error_reporting', E_ALL & ~E_STRICT & ~E_DEPRECATED);
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.