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?