cPanel can exclude selected files or directories from certain future account backups. This is useful for expendable data such as regenerated caches; it does not remove files from existing backup archives.

Choose exclusions carefully

Confirm that excluded data can be recreated and is not needed for a restore. An account-level exclusion file affects that account, not every user on the server.

Create the account exclusion file

  1. Log in to cPanel and open Files > File Manager.
  2. Go to the account’s home directory, such as /home/username, rather than the website’s document root.
  3. Open cpbackup-exclude.conf if it exists, or create a file with that exact name.
  4. Add one path per line, relative to the account’s home directory. For example:
public_html/cache
public_html/temporary-export.zip
  1. Save the file, retaining any existing exclusions that are still required.

Do not include a leading / or ./. A directory entry excludes its contents as well.

Verify the next eligible backup

These exclusions apply to WHM-managed account backups and cPanel’s full website backup. They do not apply to the separate Home Directory backup or /scripts/pkgacct archives.

Check a newly created eligible backup to confirm the intended paths are absent and required restore data is present. Files remain on the live account and in older backups. Server-wide exclusions require an administrator to manage /etc/cpbackup-exclude.conf separately.