How to exclude files and directories from cPanel backups

This article describes how to exclude specific files and directories from cPanel backups. Over time, backup files can become very large, particularly if the backup file contains other backups (for example, WordPress backups). By excluding unnecessary files and directories from backups, you can help prevent filling up the account's disk space.

Excluding files and directories from cPanel backups

To exclude specific files and directories from cPanel backups, follow these steps:

  1. Using a text editor from the command line, or one of the editors in the cPanel File Manager, create a file in the user's home directory named cpbackup-exclude.conf.
  2. Copy the following text and then paste it into the cpbackup-exclude.conf file:
    *.jpa
    backup-*.tar.gz
    cpmove-*.tar.gz
    site-*.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
    
    This list includes files and directories from various popular backup utilities, such as BackupBuddy and Akeeba. You can add additional lines to this file  for any other items that you want to exclude from cPanel backups.
  3. Save your changes to the cpbackup-exclude.conf file. All of the files and directories listed in the cpbackup-exclude.conf are now excluded from subsequent cPanel backups.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.