Working in WordPress is easy, but sometimes it causes
unwanted errors that can create a problematic situation. Some of these errors
are WordPress error 500, error 404, error 503 services unavailable, and many others. For these errors,
the error log is the best way to recognize the errors. In this blog, we will
discuss the WordPress error log and how to set up the WordPress error logs in WP-Config.
What is the WordPress error log?
The personalized document that helps in listing all the
errors and also listing the ways of correcting them. You can set them in the
wp-config file. The wp-config helps monitor the WP settings. It is useful for
debugging as well.
Need for wp-config for setting WordPress error log
As we stated earlier, the wp-config file monitors the
activities of WordPress. It helps in knowing the ways of connecting to the
database of WP. Moreover, it also determines the relevant database table
prefixes and helps in providing authentication to your site. Wp-config is
responsible for enabling the debugging mode. By doing so, WP error logs get
saved. If they are saved, it would be easy to discover WordPress errors.
Setting up WordPress
Error Logs in WP-Config File
Follow
these steps to set WP error log
a) Open the cPanel account.
b) Then open the file manager.
c) When you click on the file
manager, the following screen opens
d) There you need to click on public_html
e) After that, you can see the wp-config.php file.
f) You need to edit that by
right-clicking on that file.
g) There you have to add
the line “define(‘WP_DEBUG’, true); and this line should be added before
“That’s all, stop editing, Happy blogging.”
Note:- When your code is
false in the wp-config file, you need to change it to true.
a) It will help in turning
on the debug mode.
b) After that save your
changes
c) Now upload your
wp-config.php file again to your site.
Look over Your WordPress
Error Logs for review
a) Open the WordPress
website.
b) Then access those pages
which cause the errors and warnings.
c) Open cPanel->File manager-->public_html file-->wp-content folder. There
you find a file named debug.log.
d) You can either do
downloading of this file or you can view, or edit this file.
e) It will depict all
WordPress errors, warnings, etc.
Final Thoughts
This blog is all about the WordPress error log set in the
Wp-config file. We hope this blog works for you. If still, you are facing any
difficulty, kindly ask us in the comment section.
No comments:
Post a Comment