fix-php-errors-wordpress

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('display_errors','Off');

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

change menu color in wordpress

09

Jun
How To

How to Change the Menu Color in WordPress?

You have spent so much time searching for the most appropriate website theme as per your business. You have finally found the right one: the best layout, font, and everything else. But you are facing an issue which is how to change the menu color. Changing header color in WordPress is also easy. Do not worry, WordPress […]

Change WordPress Theme

05

Jun
How To

How to Change WordPress Theme without Losing Content?

Do you want to change WordPress theme without losing content? If yes, this guide will help you. WordPress is a CRM that can be quickly modified. Your website may have been outgrown to an existing theme and would obviously look amazing with the added features. Altogether, a WordPress theme will accomplish everything.   All in all, you[…]

Change WordPress Background Color

01

Jun
How To

How to Change WordPress Background Color of a Single Page?

The first thing any website visitor notices is the background color and font of a website. Agree? The background color gives a powerful impression of your business. Well, it’s one of the essentials of quality design. The color and the website visuals reflect your brand, style, readability, and even professionalism. This is the reason why deciding the[…]