We made a small contest in our community for this Halloween, asking our users to share their biggest web-development horror stories. The scariest ones were connected with the projects that didn’t have a backup! In this article, we will figure out why you need it, how to make it, what mistakes you should avoid, and much more.
Why do you need a site backup?
To return to a proven and secure version of the site in case of force majeure. And there’s plenty of such cases: software glitches, hardware issues, malware, hacker attacks, or just server outages.
If there are no backups, it will be impossible to restore the broken site.
How does website backup work?
All your website data is stored on the hosting provider’s server. When you back up a site, you copy data to another location – to your computer, another provider’s server, cloud storage, hard drive, and so on.
Keeping a single version of the backup is not enough. Sometimes issues with the site become noticeable not immediately but after a while. For example, a computer virus can quietly be destroying your data for several days before you realize it. Thus, your yesterday’s backup will not help to restore the site in any way. It’s better to keep backups for a month or even three months.
There’re several types of backups:
- A full backup – copying all the files and the database.
- Incremental backup – when not all files are copied but only new and changed ones since the creation of the previous copy, the WordPress full site backup, or additional one.
- Differential backup – the process of copying only those files that have been modified or created since the last time a full backup task was run. The difference between incremental and differential backups is that with a differential backup, changes in the original data are counted from the full backup and not from the previous partial backup.
- Mixed backup – consists of a full backup followed by a certain predefined number of incremental or differential backups.
Ways of backing up the website
1) Automatic backups on hosting
Any paid hosting provides an automatic backup of site files. Site backups contain page design, including scripts, logos, styles.
- Backup conducts every day automatically, so you don’t have to rely on anyone.
- You can choose a hosting where the backups’ frequency and the term that backups are stored will suit you.
- Storing the site itself and its backup in one place is not rational. In case of a hacker attack, you will lose all data at once.
- Hosting providers usually store backups for a limited time. That is, if the copy is stored for two weeks, and you found an error made 15 days ago, the backup will not help in any way.
- It is not free.
- Sometimes hosting providers may simply fail in making backups.
2) Built-in export function in WordPress
No matter if you have self-host WP or a WordPress.com site, you can use WordPress backup service. But read the description carefully! This backup is limited.
- Convenient to transfer posts to another site or something like that.
- Built-in feature. It’s great when you don’t have to make unnecessary movements. 🙃
- Allows to backup just posts and pages, links, media, and feedback.
3) Backing up websites with WordPress plugins
There’re lots of ready-to-go WP solutions to ease the backup process. Of course, they have advantages, but nevertheless, we do not recommend using plugins to backup your site. Let’s figure things out.
- Easy setup and usage.
- The smallest issue on the server could fail the backup. You won’t even know it until you need this file.
- Backups are usually stored on a website, not on a server.
- Plugins often conduct the database backup poorly. It’s possible to restore files (via other plugins), but restoring the content is much more challenging.
- At the same time, there is always the risk that the plugin backs up the website content only, not the server settings.
Here we must say that the server-level wordpress backup plugins do exist, and if, after all, you decide to choose WP plugins for storing your data, it’s better to choose this option. But remember that any plugin may fail once in a while.
The most reliable and the best way to backup the WordPress site (actually, any site) has always been the manual method, through cPanel. Let’s have a closer look at it.
How to create a backup via cPanel (way #4)?
cPanel is a multifunctional hosting control panel that allows performing the tasks more comfortably and faster. Even newbie developers can adjust websites via cPanel without difficulties.
cPanel works stably with popular technologies (Apache, MySQL, PHP, etc.). It’s multilingual, contains built-in protection tools against various types of attacks, provides the website traffic statistics, and allows saving backups of your websites conveniently.
Let’s dwell on creating backups.
- It’s reliable since you conduct and follow the backup by yourself.
- You can immediately select the destination for saving the copy.
- The process may be a bit confusing for the newbies. But every hosting is likely to have a tutorial base.
Almost all paid hostings include cPanel. The algorithm for creating backups on different hosting will be slightly different. For example, we will show the instructions for creating backups on SiteGround hosting.
Option #1 – If the website is under 5000 MB
If the site is small enough, you can back it up in a single step:
- Click the Download a Full Website Backup button.
- On the newly-opened page, choose the location for the new backup and fill in an email to receive a notification when the backup is accomplished.
- Click the Generate Backup button.
That’s all! You can find the backup in the specified folder and download it.
Option #2 – If the website is over 5000MB
If the site is large, you have to copy the database and the files separately to make a full backup.
- To make the files’ backup, you have to download all files from the public_html folder to your computer via any FTP client. After it, you will be able to upload the files back to your hosting account and thus restore the website.
- To make a database backup, you have to copy the MySQL database. To do this, you can use the phpMyAdmin available in your Site Tools > Site > MySQL > phpMyAdmin. Here’re the next steps:
- After loading the tool page, select the desired database in the panel on the left. In case you have several MySQL databases and not sure which one your website is using, open the wp-config.php file in the WP root folder, and you’ll see the name of the database displayed next to the DB_NAME option.
- A new page with the structure of the selected database will be loaded. To back up the database, click the Export button.
- On the new page, you will have to choose between the Quick and the Custom export methods. Quick is a more common method, but if you want to adjust the export process, use the Custom one. After choosing the way, select the desired format of the backup from the drop-down list and click on Go.
As you can see, this backup process requires a bit more time, but it still isn’t complicated. Note that cheap/free hostings or your localhost environment usually don’t provide cPanel. In this case, the site backup algorithm is almost similar. You will have to copy files through the file manager, but the MySQL database backup process is the same via phpMyAdmin.
And one last thing: following this link, you will be able to get up to 60% OFF the SiteGround hosting + pre-installed Crocoblock wizard plugin.
Website Backup Errors
I already pointed some out, but now let’s cover all of them.
- Only backing up the database
Of course, this is better than nothing, but you need to save the content too. If you have too much content, make a separate content database to add the latest items after each update.
- Not checking up the backup results
As I said before, any issue on the server, even an unexpected surge in traffic, can lead to the backup process failure. And you also need to check the safety of existing copies and the place where they are stored.
- Storing backup and website on the same server
A real jackpot for the intruder!
- Making backups not daily
Don’t spare space in your cloud storage, or, better yet, buy several hard drives. Losing money is nothing compared to losing data.
And now briefly
- Back up your website every day.
- Store copies on several media for at least one month, and preferably for three months.
- There’re different ways to back up the websites. We consider the old good manual way of creating copies via cPanel, the most reliable one. If you choose another method, make sure you know all its pros and cons.
Was this article helpful? Please share it with newbie developers, so they don’t make the fatal mistake, and don’t forget to make copies of their sites!