← Blog

How to Disable WordPress PHP Error Messages

WordPress1 min read

Sometimes even with the WP_DEBUG setting set to false you will see PHP error messages. This is normally because of the PHP setup configuration on the server.

If you are seeing warnings that are causing issues with your theme add the code below to your wp-config.php file and all errors will be hidden.

ini_set('display_errors', 'Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

Stuck on something like this?

I help businesses and agencies with WordPress, WooCommerce and JavaScript problems, from one-off fixes to ongoing support.