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.

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 message.

You can choose the following options:

OptionDescription
Empty Gateway LogDelete the log entries at Billing > Gateway Log (communication between you and your payment gateways). This does not delete items for transactions and invoices.
Empty Whois Lookup LogDelete the log entries for domains that clients have checked in WHOIS Lookup Log at Configuration () > System Logs.
Empty Ticket Mail Import LogDelete the log entries in Ticket Mail Import Log at Configuration () > System Logs. This removes the record of emails that you piped into the WHMCS ticket system but does not affect the tickets themselves.
Empty Template CacheDelete the existing files from the templates_c folder. 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. Make certain that the /templates_c directory is writeable so that WHMCS can 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 and you will see a Cleanup Command Successful message.

OptionDescription
Prune Client Activity LogsDelete any client entries in the Activity Log at Configuration () > System Logs from prior to the selected date. Non-client-related entries will remain.
Prune Saved EmailsDelete any emails from before the selected date.
Prune Old AttachmentsDelete any support ticket attachments from closed tickets that are also older than the selected date. The system will also delete them from the /attachments directory.

Failure to Load

If Utilities > System > System Cleanup fails to load entirely, this can be due to a missing or unreadable attachments directory.

At Configuration () > System Settings > Storage Settings, make certain that the attachments directory path exists, is readable, and is absolute.

For more information, see Migrating Storage Locations.

Last modified: June 5, 2024