How to Remove Websties Log Files in Plesk

Website log files are getting bigger and bigger as the website runs day by day, it may cause errors. I will show you how to remove log files in Plesk.

There are several kinds of log files, .gz , .webstat , .processed log files can be removed safely by using the following command:

#rm -rf /var/www/vhosts/system/example.com/logs/error_log.gz

Main website log files (access_log, error_log) should be cleared with the following command, removing main log files may possibly lead to incorrect functionality of Apache and nginx.

#cat /dev/null >/var/www/vhosts/example.com/logs/error_log

According to the Plesk official documents, different types of logs are recorded in different files, here is a list of log files types:

  • access_log. This log records all HTTP requests processed by the web server.
  • access_ssl_log. This log records all HTTPS requests processed by the web server.
  • error_log. This log contains diagnostic information. It also records any errors that the web server encounters in processing requests.
  • proxy_access_log. This log records all HTTP requests processed by the proxy web server.
  • proxy_access_ssl_log. This log records all HTTPS requests processed by the proxy web server.
  • proxy_error_log. This log contains diagnostic information. It also records any errors that the proxy web server encounters in processing requests.

Leave a Reply

Your email address will not be published. Required fields are marked *