Site icon Experience Wordpress Developer Online – Design Develop and Maintenance Support

How to Turn Off PHP Errors in WordPress

you will need to edit the wp-config.php file.

You simply set WP_DEBUG to false in your wp-config.php file. you’ll see the following code:

define('WP_DEBUG', false);

However, the problem is that some times the above does not work.
That can happen most times on cheap shared hosts that force displaying PHP warnings and notices.
In that case, you can replace this line with the following code in wp-config.php file.:

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

Don’t forget to save your changes and upload your wp-config.php file back to the server.

You can now visit your website to confirm that the PHP errors, notices, and warnings have disappeared from your website.

Exit mobile version