Why cache folders end up in the archive
wp-content/cache is disposable while wp-content/uploads is not. To the backup, both are directories full of files.
Size is only part of the cost. Every file has to be found in a directory walk, checked with a stat call, opened, read, given its own tar header, and then compressed. With a few large files, the disk reads in long sequential runs. With a million tiny files, most of the time goes to metadata and random reads. During the backup window, that raises iowait for every site on the server, not only the account being backed up. The same files also use up inodes, which is its own problem and is covered in cPanel Says the Inode Limit Is Reached but Disk Space Is Fine.
There is a restore cost too. If you restore an account with its old page cache, the site can serve outdated pages until someone purges the cache.
From the support side, tickets usually say 'backups are slow' or 'backup failed, disk full'. The useful first question is not how many gigabytes an account uses. It is which directory in that account holds the most files.
How the two exclude files work
/etc/cpbackup-exclude.conf. It is owned by root and applies to every account on the server.
The per-user file is cpbackup-exclude.conf in the account's home directory, for example /home/username/cpbackup-exclude.conf. It applies only to that account.
Both files take one entry per line. On current versions, both lists are generally applied when both exist, but confirm this against the cPanel documentation for the version you run. The per-user file sits in the user's home directory, so the account owner can edit it. That means site owners can exclude paths too. Remember this when a restored account is missing files nobody remembers excluding.
Do not assume you know what the global file contains on your server. Read it, and check the inode-heavy directories before you decide what to add:
BASH
# Global exclude list (applies to all accounts)
cat /etc/cpbackup-exclude.conf
# Per-user exclude list, if the account has one
cat /home/username/cpbackup-exclude.conf
# Directories with the most files (inodes) in the account, top 20
du --inodes -x -d 3 /home/username 2>/dev/null | sort -n | tail -20du --inodes output counts files and directories rather than bytes. A cache folder that looks small in a normal du -sh can sit at the top of this list.
Writing entries that actually match
TEXT
public_html/wp-content/cache
app.example.com/storage/framework/cachepublic_html, so a pattern written for the main site does not cover them. Check where each site actually lives before you write the entry.
In the global file, every entry applies to every account, so admins usually reach for wildcard patterns. How patterns are matched has varied in detail between cPanel versions. The differences include whether a pattern is relative to the home directory or matched anywhere in the path, and how trailing slashes are handled. Read the documentation for your version, then verify against a real archive instead of trusting the file.
The usual ways an entry fails without any error:
- A typo or wrong path, such as
public_html/wp-content/caches - A trailing slash that stops the pattern from matching on some versions
- An entry in the wrong account's file, or a file saved in the wrong directory
- A pattern that is too broad, such as one matching any path containing 'cache', which also removes directories you wanted to keep
Confirm the path is really gone from the archive
BASH
# Count archive entries under the cache path (0 means it was excluded)
tar -tzf /backup/2026-11-06/accounts/username.tar.gz | grep -c 'public_html/wp-content/cache/'
# Sanity check: real content should still be present (expect a non-zero count)
tar -tzf /backup/2026-11-06/accounts/username.tar.gz | grep -c 'public_html/wp-content/uploads/'tar.
Two more points. Exclusions only affect backups created after the change. Older archives keep the cache files until retention rotates them out, so total backup disk usage drops gradually. To confirm that the change improved backup time, compare run durations in the backup logs under /usr/local/cpanel/logs/cpbackup/ before and after the change, rather than relying on a general sense that it feels faster.
What to exclude and what to leave alone
~/tmp directory typically also holds web statistics data such as AWStats. Excluding the whole folder means losing that history on restore. Before you exclude a path, ask whether the application can rebuild it from scratch with no manual steps. If you are not sure, leave it in the backup and find out first.
Never exclude uploads, mail, or anything users created themselves just to make the backup smaller. A smaller backup that cannot restore the site is worse than a slow one.
If backups are slow or oversized, don't assume WHM is skipping caches. Find the inode-heavy directories with du --inodes and add specific entries to the global or per-user cpbackup-exclude.conf. Then list the next archive to confirm that the cache is gone and the real content is still there.