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?
Just donât set
WP_DEBUG
toTRUE
. The error level is set inwp_debug_mode()
, which is called inwp-settings.php
before any plugins are loaded. If you leave the default values WordPress will set it to: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.
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/)