Your website can be easily restored if necessary (e.g. your website stopped working because of some irreversible changes) in case you have its backup copy on your computer or in another safe storage.
We recommend to have a manual backup of a website – it can be easily restored or transferred on any server with any control panel (or even without one).
Each Wordpress website consists of two parts – website files and database.
You need to export your website database, archive website files and download this archive to get a full backup of a website.
You can find how to backup and restore website database in this guide.
Below we’ll learn how to backup website files. You may backup these files in File Manager section of a hosting control panel. Login to your cPanel, go to Files → File Manager section:
We need to learn more about WordPress files and directory structure first to make a full backup. Here you can find default list of files and folders of WordPress based website:
WordPress based website consists of all files in the root folder, wp-includes, wp-admin and wp-content folders. You may also have robots.txt, php.php and other files like google verification file in your website folder, you’ll need to include these files in a backup.
The wp-content folder is where WordPress stores all your images, media, themes, and plugins. The contents of this folder are unique to your website. Wp-config.php and .htaccess files are also unigue and contain settings that are relevant to your WordPress site. .htaccess file is a hidden file. To make it visible, you need to enable the Show Hidden Files option in the top right corner of your cPanel File Manager:
Now we need to find out the root folder of your website to backup it. If the website you need to backup is a primary domain, its root folder is public_html itself. Please note, the public_html folder may contain addon website folders (if you have addon domains attached to your cPanel). You’ll need to exclude addon domain folders from a primary domain backup. Here is an example where we have yourdomain.com as an addon domain:
Cgi-bin folder and a hidden .well-known folder are system cPanel folders, you may not include them in your backup.
Once all necessary files are selected, click Compress:
In a new window you need to select a compression type (zip is recommended):
If you scroll the window below, you can set a name of your backup archive and it’s location:
Click Compress File(s).
You’ll see this window:
Once the backup is accomplished, you’ll see this window:
Scroll it down to check if there is no error with this new archive:
If there is an error there, check if you have enough disk space for an archive to be created. We have no error in our screenshot, so the backup is ready. Click the Close button.
We haven’t changed a name and directory, so our example archive is located in public_html directory. We can download it from there to keep in safe place and restore later, if necessary:
We’ve created a backup of website files of a primary domain in our example. To backup an addon domain, you just need to select its folder and click Compress:
You can check if the root folder for an addon domain is correct in the Addon Domains section of your cPanel:
To restore website files from a backup, you'll need to upload the backup archive to website root folder, remove current website files and folders and extract files from the archive. You can open the archive before removing current website files to check the files and folders it contain. This will help to avoid removing extra files.
That's it. Don't forget to backup website database, it's a vital part of your website!