Skip to main content
3 of 6
edited title
Tim Malone
  • 4.8k
  • 5
  • 28
  • 41

Suppress deprecated notices

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);
Chris Pink
  • 734
  • 1
  • 6
  • 21