I recently came across some wired issue, were PHP warnings and notices are shown on the website even when we set WP_DEBUG
to false
in wp_config.php
file.
This happens mostly with the cheap shared hosts, were this settings won’t be respected and warnings and notices are forced to display.
define( 'WP_DEBUG', false );
To fix this issue, we need to set few other constants as well in the wp_config.php
file.
ini_set( 'display_errors','Off' ); ini_set( 'error_reporting', E_ALL ); define( 'WP_DEBUG', false ); define( 'WP_DEBUG_DISPLAY', false );
You fixed it.:)