Loading...

Ways to View Access and WordPress Error Logs.

Ways to View Access and WordPress Error Logs.

Logs are very useful in troubleshooting and debugging issues on a WordPress site. You can view your access and WordPress error logs by any of the following methods:

I) View access and WordPress Error logs using FTP

Connect to your WordPress site using FTP.
Then search for the folder named logs.



In this folder, the access logs and error logs are located. They are named as follows: access.log and error.log


For older logs archives Gzip (.gz) backups are automatically created. See the codex, for additional information.

II) Enable errorlogs in wp-config.php file

The second method to see the error logs is by enabling error logs in the wp-config.php file.
You need to first connect to your site using SFTP.
Then, download your wp-config.php file to enable editing in it.



Search for the line that says, /* That’s all, stop editing! Happy blogging. */. Just before that line, you will find a code as given below:

define( 'WP_DEBUG', false )


Change the value from false to true.
define( 'WP_DEBUG', true )


In case if any of the above codes are not present, then add the second line of code(with true value). After adding the code the file will look something like this:


To enable the debug log add the code given below after the WP_DEBUG line:

define( 'WP_DEBUG_LOG', true );​

After adding this line the file will look something like this:



Save the changes and upload this to your server. After that, the errors will get logged to the debug.log file. The debug.log file is present in the wp-content folder and also you can see the error on your domain/wp-admin login page too.


 So, in this way you can view your access and error log files.

Did you find this article useful?

Related Articles

How to add password to WordPress admin directory via cPanel ? In WordPress, you can access the WordPress admin directory by logging into your WordPress admin acco...
How to fix 500 internal server error ? There is no clear-cut solution to solve the 500 internal server error. You have to try various tips ...
How to change WordPress URL using phpMyAdmin in the DirectAdmin? The WordPress URL can be changed manually, by the use of phpMyAdmin from the DirectAdmin panel. To c...
How to set up caching for your WordPress website? With the use of Caching, your website's speed can be improved as it acts as the memory and saves som...
How to protect your Site from Brute force attacks? Hackers can upload malicious malware using brute force attacks. It can cause your site to become ina...

Categories

Website Maintenance 42
Website Maintenance Knowledge Base
SEO Services 40
SEO Services Knowledge Base
Website Design 51
Website design
Google Workspace 56
Set up Google Workspace for your team. Discover how to manage a team, migrate emails, share files, work from anywhere, and set up mobile management.
Billing 25
All type of billing information
Client Area Guide 1
Client Area Features
Delegate Access 10
Articles on Access Delegation for Third-party Platforms
Password Management 5
Password Management at Aarav Infotech India Pvt. Ltd.
WordPress 63
Knowledge base for WordPress

Shopping Cart

Your cart is empty