How to enable Debugging on wordpress?

Facebook
Twitter
LinkedIn
WhatsApp
Reddit

Enabling debug in WordPress is a super easy way to uncover all the pesky errors that pop up in the website backend or within a PHP script. These errors can really mess things up, like causing slow loading, WordPress glitches, or pages that refuse to load properly. Lucky for you, we’re gonna dive into this post and learn how to activate WordPress debugging on your own WordPress site. Let’s get to it!

Let’s Get Started!

Access Your Website Files

You can easily get to your website files by using an FTP client or the file manager in your hosting control panel. Each hosting provider has their own unique methods to access these tools.

Locate the wp-config.php File

When you’re in the WordPress installation folder, just find that wp-config.php file and go ahead and click on it to edit the code inside.

green box represents the file/folder

Edit the File

Open the wp-config.php file using a text editor, and look for the line in which there will be written:

define('WP_DEBUG', false);

Change the value to:

define('WP_DEBUG', true);

By changing from false to true, you’ll start seeing some pesky errors on your website. And if you want to stop those errors from cluttering your display, just change it back to false again.

Optional

Also, you can totally throw in these lines right below the WP_DEBUG part to start logging errors and warnings:

define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);

Enabling `WP_DEBUG_LOG` will create a debug log file called `debug.log` in the `wp-content` directory. You will find detailed information about errors and warnings in this file. To maintain a clean user experience, `WP_DEBUG_DISPLAY` and `@ini_set(‘display_errors’, 0)` make sure that errors are not displayed on your website.

Save/ Upload the File

After you’re done with the modifications, just save the wp-config.php file

Facebook
Twitter
LinkedIn
WhatsApp
Reddit

More Posts!