cPanel cleanup - best practices and cleanup advices


Aug 30, 2012
cPanel Access Level
Root Administrator

After finding that my clients have a load of error_log and other logs they ever-never use, I decided to turn to cPanel forums for an advise regarding logs/archives best practices. So here are my questions:

1) how can the size of an error_log be limited? error_log is everywhere, in most /home/user/public_html/directory/subdirectory . Can I restrict each user to a SINGLE error_log?
2) can error_log be rotated? Nobody cares about the errors from 6 months ago. Can I keep only the error_log for the last 24 hours?
3) I've noticed that the "logs" directory gets huge sometimes, for old customers. How can restrict log archiving just for one month (maximum)?
4) /var/log gets very crowded sometimes. How can I manage log rotation?

Thank you!