Tiffin Consulting

digital business transformation

Suppress Deprecated Notices

In your wp-content folder create a new folder called mu-plugins and in that folder create a php file with the error level you want, for example:

//Turns off notices
error_reporting(E_ALL ^ E_NOTICE)

If you are using PHP 5.5 +, you will get deprecated noticed for WordPress’s mysql_* functions, you can turn them off using:

error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);

Or for something really robust, which happens to be the case a lot.

error_reporting(E_ALL &  ~( E_DEPRECATED | E_USER_DEPRECATED | E_USER_NOTICE | E_STRICT ));

Source: How to remove error notices using WordPress’s WP_DEBUG | ../ wycks