Protect your online asset with backups: A step-by-step guide

Unexpectedly losing our website is a nightmare for most, but an unfortunate reality for others. Server failures, hacker attempts, data corruption, and human error are all common threats that websites can encounter. That’s why it is important backup your website both routinely and often.

The importance of backups

When it comes to online businesses, our virtual storefronts mean everything. It is our way to connect with our customers and serve our communities with our products and services. While many sites may never experience a major failure, the possibility of losing our sites in any way would be devastating. In order to protect our digital assets, data, and livelihood, backing up our sites is a must-have for your website maintenance routine.

By having a backup of your site, you save yourself a starting point for recovery if something were to happen. Something as simple as deleting the wrong file in your home directory can be fixed by restoring a previous backup of your site. Losing your site to a failed server suddenly isn’t as heart wrenching since you can jump start the recovery process with the backup you saved somewhere else. Rather than relying on chance, backups ensure that our sites will be safe and swiftly running despite unexpected failures.

Note: It’s important to ask hosting providers about backups

For online business owners who need their sites hosted by a hosting provider, it is important to consider backups when choosing a provider. Asking questions such as how often they back up your site, how much of your site they back up, how long they keep backups, and how you can access those backups should come into play when deciding how reliable their services are.

Getting started with backups

Backing up a website includes two main parts: copying your files and copying your database. Your files are your actual website: pages, assets, style configurations, code, and so forth. Your database contains important data that lets your site run smoothly, such as your site’s structure, user credentials, cached configurations, and so much more.

When it comes to backing up your site, the process can look different depending on how your site is hosted. However, there are two common ways hosting providers and self-hosting sites can backup their websites: web hosting control panel software and manually through FTP servers.

Backup your site with cPanel

Web hosting control panel software is a web-based interface that allows you to manage your site with ease. Designed with user experience in mind, the software offers a graphical user interface for admins to manage their websites. From changing security settings to managing files, hosting control panel software is a popular way to edit and maintain your website.

One of the most popular web hosting control panel software is cPanel. cPanel is a paid software that many use to manage their websites. It also has built-in tools that can help you backup your website. For those who have cPanel or are hosted by vendors that use cPanel, getting your site backed up is a breeze.

To backup your website with cPanel:

  • Log into cPanel.
  • In cPanel, go to Files and click Backup
  • To download both your files and your database in one shot, go to Full Backup and press Download a Full Account Backup.
  • Next you will be asked to select a Backup Destination. This is where you decide where you want to save the backup of your site. For example, if you select Home Directory, your backup will be saved to your server.
  • Once you have decided where to store your backup, click Generate Backup.
  • Click the Go Back option to check the status backup request. It may take a few minutes. Refresh the page after awhile to see if it is completed.
  • Once it finished generating the backup, you will see links under Backups Available for Download. Select the most recent backup to get a the most up-to-date copy of your site!

Backup your site manually via FTP & the command line

For website owners’ who self-host their own site as well as some hosting providers, manually backing up a website can be easier. Manual backups are a two-step process, meaning that you have to backup your website files and your database separately. Rather than paying for web hosting control panel software, you can backup your site files using a File Transfer Protocol (FTP) client. An FTP client is software that lets you communicate to your server’s FTP Server. Through the FTP client, you can download your site’s files. After that, you would then have to download your database via the command line. To backup your database, you would need to be able to access your server.

To complete this process, you will need to have remote access to your server and your database. This means that you will most likely have two sets of user credentials, a username and password, to access your server and your database.

To backup your site manually:

First, we will download your website files. Open up an FTP client. For this example, we will use FileZilla.

  • If it is your first time connecting to your server, go to File, then Site Manager, and then New Site.
  • Make sure you set the Logon Type to normal. Next, you will need to fill in information concerning the server you are connecting to. Your Host is your website domain name. Your User and Password will be your server credentials. The Port Number will depend on your server’s set up.
  • When complete, click Connect.
  • Once you successfully login, you will see your remote server on the right-hand side of the File-Zilla page while on the left-side of the FileZilla window is your local files. On the left-hand window, navigate to the directory you want to save your backup to.
  • On the right-hand side in your remote server, navigate to your websites root file. This file goes by multiple names, but it is commonly called www, public_html, wps-content, and so forth.
  • Either right click your site’s root folder and click download or drag and drop the folder to your local site to download a backup of your site files.

You have completed the first half of your backup! Next, we need to download your database. Exit FileZilla and open your command line.

  • SSH into your site’s server. This will require your server username and password.
  • Assuming your server is running MySQL, simply use the following command with your personal information:
mysqldump -p -u <database_username> <database_name> --add-drop-table > <path_to_backup_.sql_file>

Hit enter. You should be prompted to enter your database password. If successful, you should now have a backup of your database!

Want to learn more?

Backing up your site is extremely important to do for the safety of your content. We suggest backing up your site often and making a routine of it so that, if the worst came to pass, you have a recent version of your site to recover with. For more tips and tricks to optimize your website as well as other guides, read more on our BCSE Blog!