PHP Notices and Warnings

Occasionally you may see a PHP Notice or PHP Warning displayed, especially if you have recently upgraded to a newer version of PHP.

The first this to be aware of is Notices and Warnings are not Errors.

Notices and Warnings are to help developers clean up code issues e.g. the Notice might be that a function is deprecated in a future release. Or a Warning may be that a variable has not bee set before being used.

In general – on a production site – you should have Notices and Warning set not to display.

This is easy to do, you can edit your wp-config.php file and set

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

Or if that is too technical – just raise a support ticket to your host to ask them to suppress PHP Notices and Warnings.

Was this helpful?