Skip to main content
View error/access logs

How to view and access your server logs (error log and access log).

Karl avatar
Written by Karl
Updated over a year ago

Logs are a very useful aspect of web server administration and web development as they provide useful debugging information and allow you to analyze other aspects of your website.
โ€‹
First you need to set up file access or connect to your site with SSH in order to view or download/view your server logs.

The log files are located in /var/log/nginx/

There will be two main logs:

  • <domain>.error.log

  • <domain>.access.log

The error log file contain any WordPress errors or warnings that might have occurred on your site or server.

The access log is a list of all requests that people or bots have requested from your website, it also contain information about how long it to the server to generate each request.

If your SFTP client supports it, you can open the log files directly with your client, or you can download the raw log files and open them with a text editor.

An even better way to view the log files is to connect to your server with SSH, then use the command:

 tail -f /var/log/nginx/<domain>.access.log 

This command will show you the log entries in real time.

tail -f -n 10 /var/log/nginx/<domain>.access.log 

This will show the last 10 entries in real time of your access log.

Remember to change <domain> to your actual domain.

Did this answer your question?