Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Manage the display of PHP warnings / errors

This guide shows you how to modify the error_reporting() directive on your website.

 

Enable error reporting

Enter the following 2 pieces of information in your .user.ini file:

display_errors=on
error_reporting=E_ALL & ~E_NOTICE & ~E_STRICT

If your browser does not display any errors or warnings, then there are none.

 

Disable PHP error display

For WordPress, edit the wp-config.php file and replace the line:

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

Otherwise, you can add the following code to the .user.ini file:

display_errors=off

Has this FAQ been helpful?