Working Hours

Found Us On Social Media

How to Hide PHP Warnings and Notices in WordPress 2022

How to Hide PHP Warnings and Notices in WordPress

PHP warnings and notices are not like internal server errors, syntax errors, or fatal errors, which stop your website from loading.
They are nothing to worry about on a production site most of the time.
Though the plugin/theme developer should know about these so that they may fix them in a future release.

Hide PHP Warnings

From this article, you’ll learn how to disable PHP warnings or notice.

You need to edit the wp-config.php file.
Access the wp-config.php file
For accessing the wp-config.php file, you can use one of the below ways:

1. Enter your hosting control panel.

2. Through the FTP file manager.

3. Install and activate the File manager plugin

Steps to Disable PHP Warning or notice
1. Navigate to the WordPress root folder.

2. Find the wp-config.php file.

3. Click on Edit, or download it to your personal computer.

4. Inside your wp-config.php file, look for the following code:

define(‘WP_DEBUG’, true);

Or the following code:

define(‘WP_DEBUG’, false);

5. Replace it with the following code:

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

Save the changes and clear the browser cache to check it.

 

How to Clear WordPress Cache Tutorial Plugins

7 WordPress Website Safety Tricks to Maintain Your Website Protected

Leave a Comment

Your email address will not be published. Required fields are marked *