Disable error reporting in WordPress (2 posts)

  1. Earthman Web & Media
    Posted 3 years ago #

    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:


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

    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!

  2. Adam Blunt
    Posted 2 years ago #

    sorry wrong topic

Topic Closed

This topic has been closed to new replies.

About this Topic