WordPress:

WordPress is one of the free and open source content management tool based on PHP and MySQL. Matt Mullenweg and Mike Little has created the first version of WordPress in the year 2003. The WordPress was created only for blogs which publish easily in the website, but now it is suitable for all kinds of websites. As of now, it controls over 30 percent of all sites on the internet. The WordPress is one of an open source platform so anyone can download the software and build the new website easily.

The main reason for warnings in PHP is because of outdated plugins or themes. This doesn’t mean that the plugin and themes are bad, it just means that the file is incompatible with WordPress. The warnings and errors help the developers to debug issues with their code.

How to hide the WordPress PHP Warnings:

Before changing the modification take a full account backup. It will help you to protect your existing code and you can restore the file without any time delay.

Several methods can be used to edit the wp-config.php file of WordPress. Most people use Filezilla and Putty software to access website resources. This tutorial was demonstrated with the help of File Manager in cPanel.

Steps to Disable WordPress PHP Warnings:

Step 1: Log in to cPanel.

Step 2: Open your website “public_html” folder in the root directory.


Step 3: Select the wp-config.php file and click “Edit” button which is located in the top toolbar of the File Manager.


A new window will appear and select the “Edit” button.


Scroll down and find the line,
“define(WP_DEBUG’,false);”
Replace the below code
ini_set(‘display_errors’,’Off’);
ini_set(‘error_reporting’, E_ALL );
define(‘WP_DEBUG’, false);
define(‘WP_DEBUG_DISPLAY’, false);


Click the save button in the top right corner to save the file. Once the file is saved PHP warnings will be disabled in WordPress.


How to Enable the Warning messages:

If you want to re-enable the PHP warning messages, edit these lines and add the below code.

define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_DISPLAY’, true);

Click the save button in the top right.

We hope that this tutorial will help you to Disable WordPress PHP Error Messages. For more information, follow us on Twitter and Facebook and For video tutorials, subscribe to our YouTube channel ServerCake India.

Categorized in:

Tagged in:

,