fbpx

How to Enable WP Debug Log to Check for Errors in WordPress

At many times fixing a WordPress error might be a matter of minutes. But that is only possible when you know where the problem is. Given a situation when you do not know where a problem is generating from, it might take you days before you can find out a solution. This is where the WP Debug Log comes really handy. Once you have this feature activated it will display all PHP Error and bugs in a log format.

What is WP Debug Log?

Recommended Reading: How to fix the Establishing Database Error in WordPress

WP Debug Log controls settings for your WordPress Site as well as helps you fix both small and big errors. This file contains information about error alerts, notices and warnings.

WP Debug is a PHP constant (a permanent global variable) that can be used to trigger the “debug” mode throughout WordPress. It is assumed to be false by default and is usually set to true in the wp-config.php file on development copies of WordPress.

WP Debug Log is a companion to WP_Debug that causes all errors to also be saved to a debug.log file. This is useful if you want to review all notices later or need to view notices generated off-screen. By default, this feature comes disabled. But you can enable this feature any time. After you enable this feature, all the errors, warnings and notices will be logged and displayed inside your WordPress Admin Dashboard.

Enable WordPress Debugging Mode

  • Login to your Website’s Cpanel. You might also access your account via SSH.
  • If you are using Cpanel, go to File Manager and open the file wp-config.php. But if you are using SSH, use a command prompt and open the wp-config.php file.
  • Add the following line of text to enable debugging mode – define(‘WP_DEBUG’, true);
  • That’s it, the Debugging mode is now enabled on your WordPress Website.

Wrapping Up!

You might want to keep the WP Debug Mode enabled while you are developing something. As you are working on your project, you might end up catching new PHP Error.  Once you are done fixing the errors you can disable the WP Debug Mode. For disabling the debugging mode, you need to set the  WP DEBUG to False. To do so, first navigate to your CPanel, locate the wp-config.php file, and then add following lines – define(‘WP_DEBUG’, false);

Picture of Afshana Diya

Afshana Diya

Afshana Diya is CMO at WPDeveloper. She is helping the company to create a dynamic team and sustainable business from the scratch. When she is offline from the digital world, she must be traveling to find natural beauty in remote places.

Share This Story

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Wait… Before You Leave

Enter 2025 with BIG savings & a boost to your business.

  • 00Days
  • 00Hours
  • 00Mins
  • 00Secs