Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Log Rotation

 
advanced administration guide linuxstatistics and logschange logdomainsemail

Plesk rotates logs using the logrotate utility. This is located in
the $PRODUCT_ROOT_D/logrotate/sbin/logrotate directory, where the
$PRODUCT_ROOT_D is /usr/local/psa for RPM-based systems or
/opt/psa on DEB-based systems.

You can set the following parameters of logs rotation:

  • Log rotation condition. This may be one of the following:
    • Size - Plesk rotates logs when their size exceeds a particular
      limit.
    • Time - daily, weekly, or monthly logs rotation.
  • Maximum number of log files.
  • Log compression. Enable this, if you want Plesk to compress log files
    to gzip archives.
  • Email to which Plesk should send processed log files.

Log Rotation Settings of Plesk Services

You can define log rotation parameters for Plesk services in general and
for each domain separately.

Log rotation parameters for Plesk services are defined in the
$PRODUCT_ROOT_D/etc/logrotate.conf configuration file. Part of this
file is shown below.

# less /usr/local/psa/etc/logrotate.conf
include /usr/local/psa/etc/logrotate.d
/usr/local/psa/var/log/xferlog.processed {
    missingok
    rotate 3
    size    10M
    compress
    nocreate
}

Log Rotation Settings of Hosted Domains

In turn, log rotation parameters for domains hosted on the Plesk server
are stored in configuration files in the
$PRODUCT_ROOT_D/etc/logrotate.d/ directory.

You can configure log rotation for a particular domain through the Plesk
GUI. To do this:

  1. Log in to Plesk and go to the subscription.
  2. In Website & Domains, click Logs under the domain for which
    you want to change log rotation settings.
  3. Click the image 74886 icon on the top right and click Manage
    Log Files
    .
  4. Click Log Rotation.
  5. Change the log rotation configuration if needed.

When you click OK, the configuration is saved in the domain
logrotate configuration file
$PRODUCT_ROOT_D/etc/logrotate.d/< domain_name >. A
fragment of this file is provided below. Configuration changes are
applied equally for all log files of this domain.

/var/www/vhosts/domain.tst/statistics/logs/*.processed {
    monthly
    rotate    10
    compress
    missingok
}

Adding Creation Date to Rotated Log File Names

To make working with log files more convenient, you can include the file
creation date into the names of rotated log files. If you do this, the
names of rotated log files will have the following format
<log_name> .processed-YYYYMMDD.gz, where <log_name> is the
name of the log file before rotation, like error_log or
httpsd_access_log, and YYYYMMDD is the date of the log rotation.
For example, error_log.processed-20130101.gz.

To include the creation date into the names of rotated log files, open
the desired log rotation configuration file and add the line dateext
to the corresponding sections.

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »

Unveiling Sitejet Builder: The Perfect Match for Your Effortless Website Creation Needs

Read More »

Dynamic List vs. Active List: A Comprehensive Comparison – Unveiling the Ultimate Winner!

Read More »
Knowledge Base

Location of Domain Registration and Domain Management Buttons

Read More »

Optimizing Apache Web Server – Setting Up the Apache Restart Interval

Read More »

Uploading Backup Files to Server

Read More »

Downloading Backup Files from Server

Read More »

Hosting Wiki

  • Server Redundancy
  • Bare Metal Server
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Domain
  • Plesk
  • Web Server
  • DNS Server
  • Email Autoresponder
  • Email Alias
  • Email Virus Protection
  • Email Forwarding
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family