How to Set Up WordPress Error Logs in Few Steps
WordPress Error is the major problem so do you want to set up WordPress Error logs in wp-config file? The wp-config file in WordPress not only controls your WordPress site settings, it is also a very a useful debugging tool to help you find and fix errors. In this article, we will show you how to set up WordPress error logs in the wp-config file.
HOW TO ENABLE WORDPRESS LOGS TO TRACK WEBSITE ERRORS
Step 1: Access Your Website’s Files
For fixing the problem WordPress Error to activate your WordPress logs, you’ll need direct access to your site’s files. This can be done in a few ways, but we recommend using File Transfer Protocol (FTP). Using an FTP client you can log directly into your site. Then you can add to, edit, or delete files whenever the need arises.
If you don’t have a favorite FTP tool already, the FileZilla client is a solid choice. It’s free and simple to use:
After downloading and installing FileZilla, you’ll just need to enter your FTP credentials to access your site. These are provided by your web host, and can usually be found in your control panel.
Once you have your credentials in hand, you can enter them into FileZilla. You’ll need a Host, Username, and Password (you can leave the Port field empty):
Then, click on the Quickconnect button. When the client has connected successfully to your site, you’ll see a success message along with several new folders and files.
Step 2: Edit Your wp-config.php File
At this point, FileZilla should look something like this:
There are four main quadrants here — check out the one in the top right corner. This window should contain a few folders, including the primary (or ‘root’) directory for your WordPress website. This folder might be called root or www, or it may have the same name as your site’s domain. Either way, open it up.
In the bottom right quadrant, a long list of folders and files will appear:
Scroll down until you find the one called wp-config.php. This is an important file containing key information about your site’s configuration and database.
Right-click on it, and select the View/Edit option. Doing this will open the file in your computer’s default text editor:
Scroll down the file, looking for a line reading: /* That’s all, stop editing! Happy blogging. */. You’ll need to paste in the following line of code before this:
define( 'WP_DEBUG', true );
This snippet tells WordPress to activate the debug mode. It may actually be present in your wp-config.php file already, in which case you’ll simply need to change false to true.
Right underneath that line, you should add one more snippet:
define( 'WP_DEBUG_LOG', true );
This is what tells WordPress to keep a log of any errors in the process fixing the problem on WordPress Error that occur on your site. Together, these two lines are what set up your WordPress logs. At this point, you can save the file and close it. FileZilla will ask if you want to replace the old version of wp-config.php on your server with the new version — you should answer “Yes”.
Step 3: Locate Your New WordPress Logs
Your WordPress logs are now ready to go. Before we wrap up, however, let’s talk about how to use them.
Your new WordPress Error log isn’t going to track problems that have occurred in the past. Therefore, if you’re trying to troubleshoot a specific issue, you’ll need to trigger it again by interacting with the element or performing the action that caused it in the first place. This should prompt WordPress to log the WordPress Error
You can find the record of this error by logging into your site again using FTP. In your site’s root folder, navigate to the wp-content folder, and look for a new file called debug.log:
If you open it up, you’ll see a list of any errors, warnings, and other issues that have occurred on your site since activating your WordPress logs:
At this point, you have a few choices. If you’re reasonably tech-savvy, you can attempt to figure out what the problem is on your own and fix it. In some cases, your WordPress logs might help you understand what’s causing the error, such as by naming the element at fault. However, performing your own troubleshooting can still be challenging if you aren’t a developer (or don’t have one on hand).
If you need help, visit the WordPress forums and create a post asking for assistance. Be sure to include the text from your WordPress logs, and you should be able to get the help you need quickly. You can also try doing a Google search on the error, to see anyone has put together a guide for how to solve it.
Finally, it’s a good idea to turn your WordPress logs off when you’ve finished your troubleshooting and found a solution.
Read also:http:How to Fix Not Working Permalinks in WordPress
* You will receive the latest news and updates on your favorite celebrities!
Business Blog Write For Us | Submit Your Guest Post
Digital Treed is offering an opportunity to submit a guest post. We are looking for passionate content writers and guest bloggers to write for us following niche Finance, Business, Tech News, Social media Marketing, Online Marketing, Digital Marketing, Hardware, Apps / Reviews, SEO, Marketing, Business Blogging, Startup and Entrepreneurship