How to hide PHP Warnings and Notices in WordPress

Written by Nika

General

Updated December 11,2024

PHP warnings and notices are not like internal server error, 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.
From this article, you’ll learn how to disable PHP warning 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.

Related Articles:

  1. How to Set Styles for Single Posts in Massive Dynamic
  2. How to Set Up a Mega Menu in Massive Dynamic
  3. How to Link a Portfolio Item to an External Page in Massive Dynamic
  4. How to Add HTML and JavaScript to a Page in Massive Dynamic
  5. How to Add a Custom Shortcode to Visual Composer
  6. How to Switch a Header Menu Item to a Button in Massive Dynamic
  7. How to Access the File Address from the Media Library in WordPress
  8. How to Add a Link to the Copyright Text in Massive Dynamic
  9. Overview of Portfolio Details in Massive Dynamic
  10. How to Set Menu Item Link to Open in a New Tab in WordPress

If you encounter any issues during the process, our support team is available to assist you.

Hey Design Lovers !

Unlock Pixflow Max Annually with 30% off – Use code at checkout

"Newcomer30"