How To Enable and Disable Debug Mode In WordPress 🐞

🐞What Is Debugging?

Debugging is the process of finding and fixing errors or bugs in the source code of any software. Computer programmers study the code when software does not work as expected to determine why any errors occur.

Debug Your WordPress Website

When trying to debug anything on your site from any plugin or your WordPress theme, you first need to turn on the debug mode. WordPress includes several settings that you can use to help debug your site.

These options are usually meant for developers, and you can turn it on by editing the
wp-config.php file of your WordPress instance.
You need to login to your cPanel > File Manager or FTP and edit the wp-config.php file, which should be available in WordPress instance’s root directly.

In wp-config.php file, file the following line:

define('WP_DEBUG', false);

And replace it with the following code and finally save the file:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

💡Note

It is just a difference between “true/false.” You must reverse the above steps to turn off the debug mode.

1 Points