How do you hide PHP Warnings in WordPress?

Great Answer
0
0

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);

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

I found this solution at the following url:

https://aristath.github.io/blog/wp-hide-php-errors

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website