Tag: PHP alerts

  • Hiding PHP Notices and Warnings in WordPress

    Hiding PHP Notices and Warnings in WordPress

    Sometimes you can see some PHP notices and warnings on your WordPress page. So we created this post to help hiding PHP Notices and Warnings in WordPress

    Most of them don’t worth your attention. But if you are the plugin or theme developer then you should know about this so that you may fix them in next release. And some of this warnings and notices are sent to you just because the developer has to keep WordPress and PHP older versions compatible.

    The easiest way of hiding PHP Notices and Warnings in WordPress

    Just go to your wp-config.php file and set WP_DEBUG to false. This will not cause any changes to your website.

    But sometimes this solution may not do the thing. Mostly this happens when you use shared cheap shared hosts. Usually hosts like this force various PHP notices and warnings. So if previous solution doesn’t work you may replace it with the next linen your wp-config.php file.

    define('WP_DEBUG', false);

    with this lines:

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

    Great! We hope this tips will be useful for you!

    Create your Cleantalk account – Register now!