- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
WordPress. How to hide PHP warnings and notices
October 15, 2015
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:
-
Log into the Host Control Panel (Cpanel). Go to File Manager (or you can connect to FTP):
Get to the root directory of the website, open wp-config.php file:
-
In this file, we will search for:
1define(
'WP_DEBUG'
, false);
We will replace this piece of codes with:
123456ini_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);
Save the file.
Refresh the page to check the result.
Feel free to check the detailed video tutorial below: