How to Enable WordPress Debugging Mode to Fix Errors (2 Methods)
No one would like to face any type of issue with their WordPress website. However, within a few hours or days, you will face some problem that actually needs skills in troubleshooting. The easiest and the best solution will be to activate WordPress debug mode. This solution might seem so tricky especially for a beginner or a non-technical person.
The good news is that the process of enabling debug mode is very simple in WordPress. It will help you in recognizing the errors and will assist you in solving them rapidly. The detailed log will explain the complete problem on your website. If you are not comfortable with writing the code then you can make use of plugins.
In this article, we will study the debugging mode and how you can enable it in WordPress.
What is WordPress debug mode?
The core PHP of your website might get interrupted while changing your website. As soon as you install a WordPress best themes or a plugin, a new customs code will be added to your core PHP which might get problematic with some other tools.
Unfortunately, all these problems are not very easy to handle therefore we prefer to enable debug mode.
By activating the debug mode on your website you will be able to see the complete log of PHP errors. Plus it will display the potential warning. Therefore, if you are looking to create high-quality products for your clients then you must use this feature to get clean code.
The people who are not web professionals will also find debug mode more helpful. Consider an example that you have added new tools which result in not working your website properly.
In this situation, you can follow the instruction that we have given in this article. This will help you to find out the exact problem, after following those instructions you can get connected with your support channels for assistance.
In every situation, the debugging mode might not be important. But activating it will help you to improve the speed of the troubleshooting process plus you will be able to recognize the main problem rather than deactivating all the extensions you are using. Thus enabling the debug mode is one of the vital skills that every WordPress user should have.
Different methods to enable debug mode in WordPress
Method 1: With plugin enable the WordPress to debug mode
People who do not want to mess with PHP code should prefer this method. You will find lots of plugins that will help you in this process. One of the best plugins is WP Debugging which is just one click away.
You will have to install and activate the plugin. After then the plugin will start working instantly. Without any intervention, this plugin will set the wp-config.php file to the value true.
By doing this all notices, errors, and warnings will be saved in the log. You can view these all errors and warn in debug quick look link which is accessible in the admin toolbar.
You can also add some other settings for example WP_DISABLE_FATAL_ERROR_HANDLER.
By going to tools then clicking on WP Debugging then going to debugging constants you will find these options. You can also disable WP_DEBUG and WP_DEBUG_DISPLAY in this section.
Ensure that you have deactivated the plugin once you have finished the troubleshooting. This is an essential step to restore your website’s pre-existing constants.
Method 2: Manually enable the WordPress to debug mode
If you are an experienced developer and would like to mess with code then you can enable WordPress to debug mode manually. For this, you will have to edit the wp-config.php file. From your hosting control panel, you can access this or via FTP clients you will be able to access.
Once you recognize the file you will have to change the value of debug mode to ‘true’. To do this you just need to add this code define( ‘WP_DEBUG’, true); above the line says ” happy blogging”
All the potential vulnerabilities present on your front and back end of your website will be shown. This can be helpful for other troubleshooting methods to fail.
By enabling the debug log, you can save this information with the command mentioned below
define( ‘WP_DEBUG_LOG’, true);
Now you can disable the debug mode by adding the below code in the wp-config.php file
define( ‘WP_DEBUG’, false);
In WordPress, learning about how to activate WordPress debug mode is more important. We have mentioned two different ways i.e. using WP Debugging and editing wp-config.php file.