Categories

Featured templates

WordPress. How to hide PHP warnings and notices

Elina Webb October 15, 2015
Rating: 5.0/5. From 4 votes.
Please wait...

This tutorial will show you how to hide PHP warnings and notices in WordPress.

WordPress. How to hide PHP warnings and notices

For example this warning at the frontend:

WordPress-How_to_hide_PHP_warnings_and_notices-1

  1. Log into the Host Control Panel (Cpanel). Go to File Manager (or you can connect to FTP):

    WordPress-How_to_hide_PHP_warnings_and_notices-2

    Get to the root directory of the website, open wp-config.php file:

    WordPress-How_to_hide_PHP_warnings_and_notices-3

  2. In this file, we will search for:

     define('WP_DEBUG', false);
    

    WordPress-How_to_hide_PHP_warnings_and_notices-4

    We will replace this piece of codes with:

    ini_set('log_errors','On');
    ini_set('display_errors','Off');
    ini_set('error_reporting', E_ALL );
    define('WP_DEBUG', false);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);
    

    WordPress-How_to_hide_PHP_warnings_and_notices-5

    Save the file.

Refresh the page to check the result.

Feel free to check the detailed video tutorial below:

WordPress. How to hide PHP warnings and notices

Cool Wordpress Themes
This entry was posted in WordPress Tutorials and tagged hide, notice, php, warning, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket