• I have seen a few posts in these forums looking for a way to disable PHP notices or to disable php warnings showing up in WordPress.

    The other posts suggested putting the following at the *top* of wp-config.php file:

    error_reporting(0);

    This does not work, however, because when that file calls wp-settings.php at the bottom, the error reporting is overidden by WordPress’ own settings.

    In order for the line above to work, it most come after the call to wp-settings.php – for example:

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    
    error_reporting(0);

    Just remember, if you want to enable WP_DEBUG, you will have to comment out this line for you to see debugging errors.

    Hope this helps!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Disable error reporting in WordPress’ is closed to new replies.