Many years ago, when I first started building websites, I tried various website hosting services. I eventually found one that I thought was a really great deal. It was only $2 a month charged through a PayPal subscription. I used them for almost a year, building many different sites with their service. Then, the worst case scenario happened: the web host went offline. All of the websites I had built were down.
I contacted the webhost through their email support account and they informed me that they were the target of a Distributed Denial of Service attack. They eventually returned to service almost two days later, but I was spooked. I decided I needed to find a more reliable web host, even if it meant paying more.
I started researching web hosts and in the meantime, I canceled my monthly PayPal subscription with my current host. I had already paid for the current month and there were several weeks left, so I figured I had plenty of time to make the switch.
However, the same day I canceled my subscription, my web host deleted my account. I contacted them through their email support, but they never replied. So not only were my sites down for almost two days because the web host was offline, now my sites were completely gone!
Luckily, I had been keeping good offline backups of my sites otherwise I would have been completely hosed.
Since that incident, having good backups for my websites has saved me more than once. I’ve become almost religious about making sure my sites are backed up.
Why is it so important to back up your site? Because there are so many ways it could get damaged or you could lose it. For instance:
- You could mess up your site by accidentally deleting files or installing an update that goes wrong.
- Your web host could go down and you need to move your site to bring it back online.
- Your site could get hacked and your files might be removed or defaced.
Backup schedule
Think of your backups as insurance. The longer you go without backing up your site, the more risk you create, especially if you frequently update your site.
That brings up a good rule of thumb: if your site changes frequently, you should back it up frequently. If it’s more static, you need to backup less frequently. It really boils down to this question: how much work are you willing to lose?
What to back up
When backing up a CMS like WordPress, you have the choice to do two types of backups: database or full. In WordPress, every post you write and every page you make is stored in a database. If you want to save your posts and pages, you need to back up your database. Other changes, like changes to your WordPress themes and the plugins you install (i.e. static files), will be captured when you do a full site backup.
Again, think about how frequently your site database or other files are changing to determine the appropriate backup schedule.
Some backup options
There are many ways you can back up your website, some easier than others. Like most routine tasks, the more you can automate it, the easier it will be and more likely it will happen.
The least automated way to back up your site is to manually copy your files via FTP. Just use an FTP program like FileZilla to connect to your website files and transfer them to your local PC. There, you can zip them up and archive them.
This kind of backup is easy and makes sense for small websites. However, it’s not the best approach if you have a WordPress or other CMS site.
If you’re using WordPress, there are a lot of backup options. You can find many free backup plugins that will backup either your WordPress database, do a full site backup, or both. Some of these plugins can schedule the backups and either email them to you or save the backups on your web server.
The drawback with free backup plugins is they usually don’t have many features and their options can be pretty limited.
There are also WordPress backup plugins that aren’t free, like BackupBuddy and VaultPress. These have many more features than you’ll find in free backup plugins. For instance, with BackupBuddy, you can back up your WordPress website to your web server, Dropbox, Google Drive, Amazon S3, and more.
BackupBuddy can do a malware scan of your site files, which comes in handy if you are concerned that you have been the victim of a malware attack. BackupBuddy also has a “Migrate” feature that makes it easy to transfer an entire WordPress website between web servers without reinstalling WordPress. This is a huge timesaver, especially if you work with a lot of websites.
Another backup option if you don’t want to manage it yourself is to hire the person or company who built your website to do your backups for you, assuming you didn’t build your website yourself. Many web development professionals and companies can provide backup services and would be more than happy to do it for you for a price.
Testing your backups
While you might be very consistent about backing up your website frequently, it won’t mean anything if your backups aren’t complete or the backup files aren’t valid. This can be an issue especially if your backups are automated through a service or plugin. You may trust that everything is working the way you intended, but you don’t want to find out it wasn’t in a moment of crisis.
Testing your backups can be easy. First, make sure you can get quick access to your backups. If they’re being stored with a third party like Google Drive, test to see that you can even locate your backups. Once you find a recent backup, download it locally to your computer and unzip the files into a temporary directory. Confirm that the files you wanted to be backed up are all there. Then pick a random file and open it (you may want to do this with a text editor if the file is text-based). Check to see that the file is valid and not corrupted in any way. If it looks good, you can be confident that the other files are good, too.
You’ll want to test your backups at least quarterly to confirm that the backups are working the way they should. Going through this process several times a year has the added benefit of training you on the steps you may need to follow in the event you have to restore individual files or even the whole website.
Restoring from backups
If you ever need to restore your website, you’ll be glad you had frequent backups.
If your site is composed of static HTML files, restoring your site is simply a matter of transferring those files from wherever you’ve stored them back to your web server.
If your site is WordPress or another CMS, the restore process is a little more involved. Chances are good you’ll need to reinstall WordPress, Drupal, or whatever CMS you use. Then you’ll need to restore the themes, plugins, and any other modifications you made to the base CMS install. Then you’ll restore the database with all your pages, posts, user information, etc.
If you use BackupBuddy and you’ve been doing complete backups of your site, you can follow the instructions here to do a restore of your WordPress website.
How I back up my sites
I back up my sites several different ways:
- I purchased a service called Site Backup and Restore with Hostmonster. For $1.99 a month, Hostmonster will back up every file associated with all my websites. I do this in case I need to restore individual files that are lost.
- I back up each WordPress website with BackupBuddy. This is a WordPress plugin that will back up your WordPress website. I do this in case I want to restore or move my WordPress website.
- I do full site backups every quarter and store those on my home PC. I get these backups from BackupBuddy. I copy them to my home PC just in case I ever need them and I can’t access my BackupBuddy Stash where my backups are stored.
As a website owner, it’s important for you to take responsibility for your backups. Make sure your site is being backed up (preferably in more than one way), don’t just assume it’s being backed up by your web host (it probably isn’t). And test your backups so you know they’ll work when you really need them.
Photo credit: daryl_mitchell