How to Display Error Message in WordPress : Debug WordPress Errors Quickly & Easily

WordPress display error message

How to display error messages in WordPress seems to be one of the most common sort-after solutions by new WordPress users or web developers.

This is common when there is a problem with your WordPress website. Has your WordPress site suddenly gone blank and you have no idea what is wrong?

If this is the case, you don’t need to panic since today, I will begin to show you how to easily and quickly troubleshoot WordPress errors.

For most common WordPress errors like the White Screen of Death, if you are confident enough you may not need the help of a WordPress developer to fix it.

Using simple WordPress tips that you can freely get from YouTube and Google, you can easily fix the most common WordPress errors.

WordPress Display Error Message: Getting Started

The first step when fixing WordPress errors is to learn how you can display them and identify the location of the error.

Plugin errors commonly occur when there is a faulty plugin, a new code is added, an upgrade of the plugin or WordPress theme, and so on.

wordpress display error message

Displaying the errors is the first step towards solving them but having an idea on what caused the error can be a good place to begin. Some important questions that can help guide your WordPress troubleshooting are as follows :

  • What is the last update you have done?
  • Have you installed a new plugin?
  • Have you added a new theme or added code in your existing theme?
  • Has your hosting company changed anything lately?

If you can answer these questions you are in a good place to successfully start fixing the WordPress errors.

WordPress Display Error Message: Debug Mode ON

In the engine of your WordPress site lies a small file that plays a crucial role in connecting your WordPress site to the database and securing it. This file is named – wp-config.php.

wp-config How to Display Error Messages in WordPress

This is where you set WordPress display error message and you can now see all the errors on your site and can link them to a specific plugin or line of code in your theme.

Open this file and look for the define(‘WP_DEBUG’, false); line by default it is set to false.

To turn the WordPress display error message ON; you need to replace the false with true and save the settings.

define(‘WP_DEBUG’, true);

When you set this to true you can now see all the errors in your WordPress site.

If you have a white screen of death error on your WordPress site, you should use your hosting c-panel to access the wp-config file or the FTP logins.

WordPress Development Error Message Display

If you are a WordPress plugin developer or WordPress theme developer, it is advisable (WordPress Coding Standards) that you always turn on the debug mode when you are developing a theme or a plugin since it will help you notice the errors that are in your code and you can fix them before you release the plugin or theme to the public.

WordPress Display Error Message: htaccess Edit

Another way to display errors in WordPress is by using the htaccess file. You just need to add the following code in the htaccess:

php_flag display_errors on

This works like the debug mode set to on and it will turn on the WordPress error message display.

wordpress display error message

Reading the Server Error Log

Another quick way to identify errors in your WordPress site is to check out the server error log. When you log in to your hosting account at the root of WordPress installation there is a file named error log as shown in the image below :

wordpress display error message

This is an important file that shows you how your site health is progressing with time. You can see the plugins causing errors and remove or upgrade them.

wordpress error log display

Final Thoughts

These are the basic ways you can use to display errors in WordPress and it is the best way to get started fixing WordPress errors since you can always know where to look. If you are having error problems in your WordPress site, you can always feel free to reach out and I will be glad to provide some professional help in fixing WordPress errors.

Similar Articles

Comments are closed.