WordPress
is dominating the world of websites. It has 50% of the market share on websites
and blogs globally. These statics means that WordPress is a great forum to
build a website and blog. However, one cannot deny that it is not free from any
error. Now here is a point, do you know how to detect errors, of course, we are human beings, and we cannot do it manually. It needs a simple coding
implementation on the website. The WORDPRESS Error Log is an effective way to see
errors and their causes within the website. Error log setup happens in the
Wp-config file is important because one can trace the cause of the error.
It
also works as a debugging tool to help in finding and troubleshooting errors.
Why and when you should configure WordPress Error Logs in
Wp-config File
WordPress
has the most crucial Wp-Config file, which is like the backbone of the website.
It has WordPress settings, database information, and other configuration. This file
contains information such as how to create an authentic way to make site safe,
what type of database table to be utilized, steps to connect the Wordpress
database, and all that.
Users
can upload the error log in the WP-Config file. This error log acts as a
debugging tool and identifies errors whenever a site gets encounter such
errors.
How to Setup Error Logs in Wp-Config-PHP-file
Users
require making changes in Wp-Config-PHP-file. Access your config file using A
FTP details through the FTP client-server, or you can also navigate to the file
through C Panel admin details.
Search
the Wp-config file in the root folder of the main server and the search the
sentence “That’s all, stop editing! Happy blogging.’
You
need to put the following code before this sentence.
define
( 'WP_DEBUG', true );
However,
this file might be present in your wp-config.php file and established as false.
In such a scenario, you need to change false into true.
This
code will help enable the WordPress to debug mode. But the drawback of this
debugging tool is that the errors such as WORDPRESS error 500, WordPress
404 error, White screen of death, etc. that will appear in backside might also
appear in front display of the website.
But
in case you want errors to be logged, you need to place the below-mentioned
syntax in your wp-config.php file beneath the WP-debug code.
define(
'WP_DEBUG_LOG', true );
Now
save WordPress file and you have successfully configured Error logs in your
WordPress website.
No comments:
Post a Comment