System Cleanup
Over time, the log files in WHMCS can become very large. WHMCS allows you to prune logs to reduce the size of the database and reduce disk space.
You can access this feature at Utilities > System > System Cleanup.
Only delete information that you're certain is not necessary. WHMCS Technical Support cannot assist with some cases if you have removed the relevant log files.
Contents
Cleanup Operations
You can remove data using the following options:
Simple
For each option in the Simple tab, click Go to empty that log or cache.
The system will immediately remove the data and you will see a Cleanup Command Successful success message.
Empty Gateway Log
Deletes the contents of the Billing > Gateway Log (communication between you and your payment gateways). It does not affect transactions and invoices.
Empty Whois Lookup Log
Deletes the contents of the WHOIS Lookup Log at Configuration () > System Logs or, prior to WHMCS 8.0, Utilities > Logs of the domains that clients have checked.
Empty Ticket Mail Import Log
Deletes the contents of the Ticket Mail Import Log at Configuration () > System Logs or, prior to WHMCS 8.0, Utilities > Logs. This removes the record of emails you piped into the WHMCS ticket system but does not affect the tickets themselves.
Empty Template Cache
WHMCS caches templates into static files to reduce the loading time of each page. In order for template changes to take effect, it is necessary to clear the cached files using this tool. This removes all existing files from the templates_c folder.
Make sure the /templates_c directory is writeable so that WHMCS is able to delete the cache files and generate new ones.
Advanced
For each option in the Advanced tab, select a date and click Delete. The system will delete log entries, emails, or attachments from before that date.
The system will immediately remove the data and you will see a Cleanup Command Successful success message.
Prune Client Activity Logs
Select a date to remove any client entries in the Activity Log at Configuration () > System Logs or, prior to WHMCS 8.0, Utilities > Logs before that date. Non-client-related entries will remain.
Prune Saved Emails
Select a date under Prune Saved Emails on the Advanced tab at Utilities > System > System Cleanup and click Delete to remove any client e-mails from before that date.
Prune Old Attachments
Select a date to remove any support ticket attachments from closed tickets which are also older than the date selected. The system will also delete them from the /attachments directory.
System Cleanup page fails to load
If the System Cleanup page fails to load entirely, this can be caused by a missing or unreadable 'attachments' directory.
You should ensure the attachments directory path configured in Storage Settings exists and is readable. It is also important to ensure the attachments directory path is absolute and not relative to avoid timeout issues on the System Cleanup page.
For more information on changing the Storage Settings path, see Moving Storage Locations.