Deleting Per Account cPanel Error Logs

JeffTechnical Articles & Notes

cPanel does not rotate or in any way limit the size of the per-account error_logs which are created for each folder of each account on the server by Apache.

Apache can be configured not to create them at all but they are extremely handy for debugging.

They can of course become very large and hog a lot of disk space, especially for high traffic sites which are generating any errors.

Here’s a quick (to type, it takes a while to run) and dirty way to delete all account’s error_logs. Run this on the command line as `root`:

find /home -name 'error_log' -exec rm {} \;

WARNING: Take extreme care with this potentially very dangerous command. It has the power, if entered incorrectly, to delete everything from your server!