How to disable PHP error display

I’m trying to disable the debug log from showing in my dev site. I’ve added the following lines to my wp-config file, but still getting php warnings (from WooCommerce).

define( ‘WP_DEBUG’, false );
define(‘WP_DEBUG_LOG’, false);
define(‘WP_DEBUG_DISPLAY’, false);

Any ideas? Thanks!

You may want to disable Xdebug: open [site]/conf/php/[version]/php.ini and put a semicolon in front of the line, almost at the bottom.

(There’s a thread about this around here somewhere, searching for XDebug might find it)

1 Like


Just a heads up, WP_DEBUG isn’t enabled by default in Local.

Here’s another snippet you can try adding to the wp-config.php file:

ini_set('display_errors', '0');
ini_set('display_startup_errors', '0');

Thanks, @clay & @philby! The combination of those two did the trick!

1 Like

You should consider this in next release version… Use that constant.

its verry usefull if i want to display warning/error.

Even if u set “define( ‘WP_DEBUG’, false );” in wp-config.php

I see all warning

1 Like