Skip to main content
added 91 characters in body
Source Link

I'm working on a development site that has some plugins that produce notices. It's a bit annoying during development when you only want to see the errors your own code produces.

How can you turn off notices in WordPress but keep reporting of errors enabled?

I thought this should work, but it doesn't:

define( 'WP_DEBUG', true );
error_reporting(E_ALL & ~E_NOTICE);

Edit: I should point out that I added this code to the wp-config.php, just to be clear.

I'm working on a development site that has some plugins that produce notices. It's a bit annoying during development when you only want to see the errors your own code produces.

How can you turn off notices in WordPress but keep reporting of errors enabled?

I thought this should work, but it doesn't:

define( 'WP_DEBUG', true );
error_reporting(E_ALL & ~E_NOTICE);

I'm working on a development site that has some plugins that produce notices. It's a bit annoying during development when you only want to see the errors your own code produces.

How can you turn off notices in WordPress but keep reporting of errors enabled?

I thought this should work, but it doesn't:

define( 'WP_DEBUG', true );
error_reporting(E_ALL & ~E_NOTICE);

Edit: I should point out that I added this code to the wp-config.php, just to be clear.

Source Link

How do you change error reporting to only show errors in WordPress?

I'm working on a development site that has some plugins that produce notices. It's a bit annoying during development when you only want to see the errors your own code produces.

How can you turn off notices in WordPress but keep reporting of errors enabled?

I thought this should work, but it doesn't:

define( 'WP_DEBUG', true );
error_reporting(E_ALL & ~E_NOTICE);