WordPress has an error log facility, which is also called the debugging
mode, which is, by default, turned off. Either the website as an existing error
log or you have to replace the error log through the tutorial. Luckily editing
this is simple. Let's know how to set and use WordPress logs.
Step 1: Go to your WordPress files
If you want to establish a WordPress error log, you will require the
Cpanel details or FTP details of your site. Take the help of the FTP
client-server and fill the correct credentials to access your file. (a Host,
Username, and Password). This information you can get from your hosting
provider and then enter the correct details so that you can connect the
WordPress files easily with the help of FTP.
Step 2: You will need to Edit Your Wp-Config.Php File
After connecting through FTP, you will find the folders
in your root directory. Find wp-config.php (a critical file that contains the
site's database and configuration details). Go to the data and Right Click on
it and choose the View/Edit option. After that, you can open the file in your
Text editor.
Find the phrase that says /* That's all, stop editing!
Happy blogging. */. You will require to add
the line of syntax just before this phrase
define('WP_DEBUG', true );
This syntax is commanding WordPress to enable the debug
mode. It might be available in your
Wp-Config.Php File, in which you need to replace false to
true.
After that you need to write another syntax just beneath
that line.
define('WP_DEBUG_LOG', true );
This code of line instructs WordPress to maintain logs
and detect any error that hits on your site.
These two syntaxes can distinguish errors in your
WordPress logs. Please save the file and close it. FileZilla will flash message
if you want to overwrite the old version of wp-config.php on your server with
the new one- you must click on "Yes."
Step 3: establish Your New WordPress Logs
Now your WordPress logs are ready to function. You can
check the record of error by connecting your site via FTP. In the root folder
of your website, go to wp-content folder and search for a new file called
debug.log:
These error logs will
indicate you about possible WordPress errors like WordPress 500 Errors, White screen of Death,
WordPress 500 internal server error, etc. if these errors occur on your
website.
No comments:
Post a Comment