How to Turn Off PHP Errors in WordPress

PHP error messages are important for developers to learn about issues on the website. So, it helps them resolve these issues immediately. However, these notifications show up for all website visitors over the web. This makes the WP website look very unprofessional.

Naturally, you don’t want that.

In this post, we help you learn how to turn off PHP errors in WordPress on your own to make it look good to visitors.

Should you turn off PHP errors in WordPress?

The first thing to know about these errors is that PHP error messages are alert notifications that warn developers and admins about some coding error in the website. A PHP error does not interfere with the loading of your website (unlike in the cases of fatal errors, syntax errors, and internal server errors, etc.).

A warning message only helps website, theme and plugin developers learn about issues that they need to resolve using an appropriate code.

So, if you’re developing a custom website, theme, or plugin, then you need these warnings to know about issues. Otherwise, it’s suggested to turn off PHP errors in your website so that your website doesn’t have to look unprofessional to your viewers.

In case you get notified about any of the PHP issues on your admin panel, contact the respective developer to fix that issue. However, turning these off for the front end is a smart step to take.

Here, we help you disable PHP errors and messages on your WP.

How to Turn Off PHP Errors in WordPress

You can do this task by accessing the wp-config.php file in your WordPress either via FTP or File Manager in your cPanel.

When you open the wp-config.php file, do the following:

define('WP_DEBUG', true);

In case, the code is set to false, you will see the following:

define('WP_DEBUG', false);

If you see this code, replace it with the following codes:


ini_set('error_reporting', E_ALL );

define('WP_DEBUG', false);

define('WP_DEBUG_DISPLAY', false);

Once done, save the changes

Now, upload the PHP file to the server again

After this, you need to access your website again to see if the PHP errors and messages are gone from the front end of your website.

This is how you can disable PHP error in WordPress and make sure your site looks professional and well-built. In case you make custom changes to your WordPress keep track of all alert notifications and warnings to ensure there’s no delay in any resolution to bugs and issues.

Your Comment:

Related Posts



How To

How to Fix Error Too Many Redirects Issue in WordPress

Too many redirects issue on WordPress? No worries! This happens due to an incorrect settings or faulty plugin. When this issue arises, the user is unable to enter their website’s dashboard. Go through this complete post and save yourself from the hassle of not being able to access your website due to the ‘too many redirects’ error. […]



How To

How to Fix Add Media Button Not Working in WordPress

WordPress is becoming advanced day by day but there are some technical failures that keep occurring every now and then. Among those common issues is the add media button not working issue. The worst part that users feel so much frustrated about is that there is no warning or notification why the button isn’t functioning. No matter[…]



How To

How To Fix WordPress Login Page Refreshing/Redirecting Issue

The issue of WordPress login page refreshing/redirecting is very common. When this happens, users get locked out of their website’s admin dashboard and cannot access anything inside it. Although this WordPress issue can occur at anytime due to some specific reasons, there are some easy solutions to resolve it. In this post, we help you discover how[…]