Once you start with the websites, you might encounter different types of issues in the near time. Developing troubleshooting skills comes in handy to resolve such issues for a healthy website. Similarly, getting issues on WordPress sites is not a surprise. While browsing WordPress sites, there might be showing errors like "Error establishing a database connection". It is difficult for a programmer, developer, or regular user to know the exact issue with these details.
To resolve such issues, getting the details on the issue comes in handy. For that, there are debugging methods for WordPress sites. It results in the details of the issue with the related logs which helps to resolve it quickly. Using a plugin is also a way to resolve the issues.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related WordPress configuration queries.
In this context, we shall look into the WordPress debug mode and enable it on WordPress to get details of errors, which further helps to resolve the issue.
In WordPress, you might like a new theme and install it that might not be compatible and conflict with other tools. Other cases such as changing database user, user password, database name might be wrong on the configuration file "wp-config.php". So there might be any error that causes the error on the core PHP of the WordPress site.
Sometimes, your website might show the error as "Error establishing a database connection".
Here, there might be any error which needs to be found to resolve the issue. Here comes the debug Mode, that helps to find the error logs to resolve the issue at the earliest for a healthy site.
Here, you are going to learn the different methods to enable the WordPress debug mode which will display the error logs to resolve the issue. One of the methods is to change the configuration manually or you can use a plugin which will automatically add the code on the configuration file.
1. Installing a Plugin
2. How to manually enable the Debugging Mode ?
Most programmers or developers like to manually enable the debug mode by editing the configuration file "wp-config.php". It is located in a public folder where all the site contents are available such as /var/www/html/test.com.
This article covers the procedure of debugging a WordPress site to enable you easily detect the errors and resolve the issue as soon as possible. In fact, WordPress provides a debug tool to help discover what may be the cause of an error on your website. This tool can display information on your live website. You can then check that log file to determine the cause of the issue you're attempting to resolve.