Downloading your site's raw access logs through cPanel will provide you with a plain text file which you can then review for information about your website visitors. This can also be helpful if you are working with someone who needs to see your website statistics, but you do not wish to give that person access to your cPanel account.
How are raw access logs saved?
By default your raw access logs are regenerated approximately every 24 hours. Without archiving, you will only see the logs for the past cycle (approximately 24 hours).
If you want archives of each cycle saved, you will need to first configure this in cPanel.
How to archive logs:
- Begin by logging into your cPanel account.
- Click on the Raw Access Logs icon in the Logs section of your cPanel home page.
- In the Raw Access Logs page, check the box next to Archive logs in your home directory at the end of each stats run.
- Optional: You can also select the box for Remove the previous month's archived logs from your home directory at the end of each month to have those deleted automatically for you.
This will update the archived log each cycle so that you can download the archive when you're ready. If you opted to remove the previous month's logs in the configuration above, be sure to download the archive before the end of the month.
Downloading your raw access logs from cPanel
To download your raw access logs, you have a couple of options. You can download your current raw access logs or an archive of the logs from within the Raw Access Logs page in cPanel. You can also download the archive files through either the cPanel File Manager or an FTP program.
Downloding from the Raw Access Logs page:
Below the Configure Logs section, you will see sections for Download Current Raw Access Logs and Archived
- Raw Logs. Click on the domain you want the logs for (in either area) to download a compressed log file to your local computer.
Downloading Archives with cPanel File Manager or FTP:
- Using either the cPanel File Manager or a stand alone FTP program, navigate to the logs folder inside of your home directory.
- Download the file for each domain you want the access logs for.
Opening and Viewing cPanel Raw Access Logs
Once you have downloaded the file to your local computer, to view the logs, you will need a program that can extract files from the Gnu Zipped Archive (.gz extension). For a list of compatible utilities by operating system, please see:
Program(s) that open .GZ files
Once you have extracted the logs, you can then use any plain text editor (e.g. NotePage, Text Edit, etc.) to open the log and view the information. You can also import the file into your preferred web statistics program.