How to Backup & Restore WordPress Blog using cPanel?

If you are using cPanel as your hosting control panel and are running a self hosted installation of WordPress, then let’s check out in this post the easiest way to manually backup and restore your blog and all its content using cPanel’s inbuilt full backup feature?

Note: There are lots of different ways to backup your WordPress blog, but I will highly suggest you to use the full backup feature of cPanel as it backs up EVERYTHING like your blog’s database, A and CNAME Records (DNS Records), MX entries etc. Also restoring your account using the full cPanel backup file (.tar.gz) can be considered quite easy and fast when compared to some other methods.

How to generate a Backup File?

Follow these steps in order to generate a backup file of your whole account:

1. Login (secure login) to your cPanel account and look for Backup Wizard icon under Files. Click on it:

backup wizard

2. On the next page click on Backup button under Backup/Restore:

backup button

Since we are going to create a full backup of your account, click on Full Backup button instead of Home Directory, MySQL Databases and Email Forwarders and Filters buttons under Partial Backup:

full backup

3. The immediate next page will ask you the Backup Destination (where you want to store the generated backup file) and your Email Address. Select Home Directory from the drop-down menu under Backup Destination and enter your email address (your default cPanel account email address should be present in this field already):

generate backup

4. Click on Generate Backup button and cPanel will start backing up your whole account. The whole process may take some time depending on the size of your account and total number of inodes present in it.

Once the backup process is complete, you will receive a backup confirmation mail in your email address and a .tar.gz file will be present in the home directory (/home/<cPanel username>/) of your account. You can either download the file onto your computer’s hard drive OR you can transfer it to a remote server.

Excluding certain Directories and Files from the Final Backup

By default, the full cPanel Backup file contains all the directories and files present in your account. However, if you want to exclude certain directories and files from the final backup, then you need to configure cpbackup-exclude.conf present either in the Home Directory of your account i.e. /home/user/cpbackup-exclude.conf (Local Exclude File) OR inside the etc folder i.e. /etc/cpbackup-exclude.conf (Global Exclude File):


The Local Exclude file is meant for excluding files and directories from the backup of specific users, while the Global Exclude File is used to exclude files and directories from the backup of all users.

In these files you need to type the name of all items (one per line) which you want to exclude from the final backup.

Note: If you enter a directory name in local or global exclude files then all the files and sub-directories present within it will be excluded.

How to Restore your account using the Backup File?

A full cPanel backup file can be restored only by a root user on a server. If you are using shared hosting then you cannot restore your account using the backup file you generated earlier because you do not have full root access to your server. Full root access is generally provided to users who are using a Virtual Private Server (VPS) or a Dedicated Server.

Shared hosting users are required to provide the backup file to their web host and ask them to restore their account using it. Either you can upload the file to the home directory (/home/<cPanel username>/) of your account OR you can provide your web host a direct download URL of the file, if you have saved it on some third party server.

Important notes:

  • If you are providing your web host the full backup file for restoration, then there is no need to pay anything to them. But if you are requesting them to retrieve a backup file from their side for restoration, then they may charge you some money.
  • Full cPanel backup file comes very handy when you want to switch web host, provided that your new provider is also offering you cPanel as your hosting control panel. Just provide the backup file to your new host and they will restore your account almost instantly. Some of them may ask you to give the username and password of your old account, so that they can login and move your account themselves.
  • If you are looking for a backup service that can automatically backup your WordPress blog on a daily basis, then I will highly suggest you to use VaultPress.