Excluding files and directories from cPanel backups
By default, cPanel backups include all files and directories in your account. Over time, backups can become very large especially if they contain other backup archives (like WordPress backups). To save disk space and keep backups efficient, you can exclude specific files and directories.
Why Exclude Files?
Section titled “Why Exclude Files?”- Prevent backups from becoming unnecessarily large.
- Avoid duplicating backup archives inside backups.
- Reduce storage usage and speed up backup creation.
Steps to Exclude Files and Directories
Section titled “Steps to Exclude Files and Directories”-
Log in to cPanel
Section titled “Log in to cPanel” -
Create the Exclude File
Section titled “Create the Exclude File”-
In your home directory (
/home/username/), create a file named:cpbackup-exclude.conf
-
-
Add Exclusion Rules
Section titled “Add Exclusion Rules”-
Open the file in File Manager or a text editor.
-
Paste in the following example rules:
*.jpabackup-*.tar.gzcpmove-*.tar.gzsite-*.tar.gz*/com_akeeba/backup/**/backupbuddy_backups/*public_html/cache/*tmp/*logs/*softaculous_backups/**/wp-content/uploads/wpcf7_captcha/**/wp-content/widget-cache/**/wp-content/cache/**/wptsc-cachedir/**/wp-content/ai1wm-backups -
These cover common backup utilities (BackupBuddy, Akeeba), cache directories, and temporary files.
-
-
Save the File
Section titled “Save the File”- Save your changes to
cpbackup-exclude.conf. - From now on, cPanel will skip these files and directories in backups.
- Save your changes to