Creating a backup of your website files

While we have several safeguards and disaster recovery measures in place, it is always best to have a back up of your website files. This can be helpful if you make a mistake while editing your website files, or if you plan on moving your site to a new server.

There are several ways to back up your site files, with as many different tools to use. While we could never go over all of them here, we will touch on the most common and easiest methods.

The Easy Method – the cPanel File Manager

The easiest method of backing up your files is directly from the cPanel File Manager. From the File Manager, you can download your files to your local machine. However, it would be very tedious and take a long time to download each file individually. Instead, you can create an archive (tar or zip file) that contains all of your files and then download it. If you need information on your File Manager, you can find information here.

Once you are logged into your file manager, you should be able to find your document root (where your website files are stored). The document root for your main domain is the public_html folder. If you have addon or subdomains on your account, they are typically found as sub-folders of the public_html folder, or are found in the home folder. If you cannot find the document root for your addon or subdomains, they are listed in their respective sections in cPanel.

cPanel File Manager

Create Archive

The first thing to do before you can download your website files is compress your files into an archive first. This may sound difficult, but it is actually very easy.

  1. In the navigation bar, click on Select All to select all of the files and folders in your document root.
  2. Next, click on Compress in the top menu bar. Or, you can right-click on the selected files and click Compress in the context menu.
  3. The Compress window will pop up.
  4. Choose what type of archive you wish to create (any will work fine, but zip is recommended).
  5. Click on Compress File(s) at the bottom of the window to begin creating the archive.

Downloading Files

Once you have your archive file created, you can download it to your local machine. It is a good idea to rename it first though. You can rename the file by right-clicking on the file and selecting Rename from the context menu.

A good practice is to name your archives something that refers to the domain name and should include a date stamp. For example, if your domain is example.com and you created your archive on January 1st, 2020, a good name for it would be example_com_01012020.zip.

Now that you have your archive renamed, you can download it to your computer. To do this, you can either select the archive and click on the Download button in the top menu bar. Or you can right-click on the file and select Download from the context menu.

It is a good idea now to remove the archive from your web server, as they can take up a lot of space. Or, if you back up often, only keep the latest archive on the server.

Congratulations!!! You now have a back up of your website files. Now, depending on what type of site you have and what CMS you are using, you may want to create a back up of the database as well. Check out this guide for creating database back ups (or dump files, as they are referred to).

The FTP Method – Using an FTP client

The best method for backing up your files if you are editing your files yourself is to use an FTP client. This method will allow you to have a copy of all of your live website files on your local machine as well. You can use any FTP program for this, but for this guide we will use FileZilla.

Once you are connected to your web server with the FTP client, you should navigate on the web server side (right) to your document root folder. This is the folder where your website files are stored.

Now, on the local side of the FTP client, navigate to an empty folder where you want to store the files. You should create a new folder and give it a name that identifies what site the files are for, and include a date stamp.

For example, if your domain is example.com and you are preforming the back up on January 1st, 2020, a good name for the folder  would be example_com_01012020.

Now, it is just a matter of selecting all of your files on the remote side and clicking on Download. Depending on how many files there are and the type of site, it may take time for all of the files to download. The good news is that it should be fine to leave this process to run in the background. This would be a good time to grab a coffee or catch up on your email.

Once the process completes, you will have a copy of all of your files on your local machine. If there are a few minor updates that need to be done to your site, you can update the files on your local machine first, and then upload them to the server once you are happy with the changes.

FileZilla folder structure

If you plan on doing back ups quite regularly, you should create a new folder for each back up. Here is an example of how I back up sites.

Remember to back up your database as well.

If you are still having issues, and need further support, please reach out to our support team using any of these methods.

Recent Articles

What is Cloud Hosting

You probably have heard a lot of buzz around the internet about "the cloud". But what is the cloud that everyone is so excited about, and what does it have to do with your [...]