Sunday, April 14, 2024

How to hide PHP Warnings in WordPress

After I moved one of my sites from the local host MAMP location to the live domain, I started receiving a couple of php warnings for a plugin.

My wp-config.php file already had the line: define(‘WP_DEBUG’, false);
but I received the warnings anyway.

The following resolved the problem for me:

In wp-config.php, replace:

define('WP_DEBUG', false);


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



What are your feelings
Updated on March 26, 2024