Log rotation limits how much local storage old website logs consume while preserving a useful investigation window. Set retention according to traffic volume and operational needs. Disabling logging or deleting every log is not a good response to unexplained growth.
IN THIS ARTICLE
Check access and requirements
Identify which domain logs are large and whether an incident or reporting process needs them preserved. Estimate daily growth, available space and required retention. Local rotation is not a substitute for a protected off-server archive when longer retention is required.
01 Configure website log rotation in Plesk
- Open the domain Logs page, then Log Rotation or the equivalent control under Manage Log Files.
- Enable rotation and choose an available size-based or time-based policy suited to the volume. A very small threshold can create many files without providing useful retention.
- Set the number of retained files and compression where supported. Consider how many days that actually represents at normal and peak traffic.
- Review any email-delivery option carefully. Logs may contain sensitive data and large attachments, so a secure archive destination can be more appropriate than routine email.
- Save the policy and observe the next scheduled rotation. Preserve required older logs before reducing the retention count.
02 Example: translate retained files into an investigation window
Suppose a size-based policy keeps eight rotated files. If normal traffic produces one rotation each day, those files cover roughly eight days. If a traffic spike produces four rotations per day, the same count may cover only about two days. The active file and varying request volume make these estimates approximate.
Check actual file timestamps after the policy has run. Choose retention from the investigation window you need and the observed growth, then confirm there is enough storage. Compression reduces occupied space but does not turn a file-count policy into a guaranteed time-based archive. Preserve required incident evidence separately before reducing the count.
How do I verify log rotation is working?
Confirm rotated files appear, compression works and new requests continue to reach the active log. Check disk usage after the normal rotation cycle rather than expecting an immediate drop at the moment you save.
Resolve setup problems
If storage continues growing, inspect application logs, mail logs and backup archives that are outside this domain policy. Do not manually truncate files needed for an active incident without an evidence copy. If rotation fails, review permissions and server maintenance errors with the administrator instead of repeatedly changing thresholds.