WordPress has many errors in its premise. Users encounter
different errors while using the WordPress site. That is where the WordPress Error logs come to identify errors. This tool monitors errors
and restores them in a single easy to navigate the file. After detecting
errors, you can begin fixing the process.
The fortunate thing is
that feature of error log facilitate WordPress user to implement debugging
mode. This mode is turned off by default. If the website already has a log,
then it is fine. We will know how to use the WordPress log.
Step 1:Visit your WordPress
files
If you intend to set a WordPress error log, there is a need for CPanel and FTP information on
your website. Use correct credentials (a Host, Username, and Password). These
credentials will help you to navigate to the WordPress files. You can get
credentials from your web hosting service provider.
Step 2: Make changes to
Your Wp-Config.Php File.
When connecting the
WordPress file via FTP details, you will detect the folder in the root
location. Now you need to search wp-config.php file, which is the most
important file that has all the information on database and settings). Please
tap on the file and Right-click on it and select the View/Edit button and open
the file with the help of Text editor.
Search a sentence that
indicates /* That's all, stop editing! Happy blogging. */. And add the
following code of line before this sentence.
define('WP_DEBUG', true
);
This code of line
redirects WordPress to allow debugging mode. However, it is also possible that
the code already exists in your Wp-Config.Php File, where
you need to change the 'false' word into 'true.'
Note down another code
of line just below that line.
define('WP_DEBUG_LOG',
true );
This syntax allows
WordPress to preserve an error Log and identify errors that come on your
website.
The codes, as mentioned
above, can trace errors in WordPress logs. You need to save the file and then
upload it. The message flashes in FileZilla say do you want to replace the old
version of wp-config.php with the new files, click on Yes."
Step 3 Set New WordPress
Logs
After writing the code
and uploading files in the service, your WordPress log is prepared to operate.
If you want to see the errors recorded in the file, then go to the root
directory and select the WP-Content folder and find a new file known as
debug.log.
With the help of this error log, one can detect many
errors such as WordPress Internal Server Error, White screen of Death, WordPress 404 Error, and more. Users can start
troubleshooting after finding the exact error and its reason. Thus having a
WordPress error log is just making your file maintained with the information of
errors that are hitting your website from time to time. It will give you enough
time to take essential steps to resolve errors accordingly.
No comments:
Post a Comment