When someone calls me for website help, one of the first questions I ask is: do you have a backup of your website? Creating a backup of your website takes only a few minutes of your time, and can ensure that should your break or disappear altogether, it can be back up and running in no time.
Website Horror Stories
Before you can fully appreciate the benefit of having a backup of your website, you may want to take a moment to consider what it’s like to have something go wrong and not have a backup. I’ve seen it too many times — a new web developer overwrites the wrong files, the host changes the website or something breaks for a reason that can’t be determined, and there’s no way to fix it.
If your website files become infected with a virus (which happens often with open source content management and ecommerce systems), it can be nearly impossible to locate all of the instances where malicious code has been injected into your site. Rather than paying someone to painstakingly clean 1,000 files by hand, wouldn’t it be easier to simply restore a backup of the working website and then identify the vulnerability and fix it?
How to Backup Your Website Properly
Backing up your website is easy. In most cases, this simply means downloading all of the files from the server onto your local hard drive. If your website uses an ecommerce system or a CMS like WordPress, you’ll want to back up your database, as well. With these two pieces of your website in hand, a competent web developer can restore your website to working order in less than an hour, no matter what goes awry.
If you update your website often, adding new pages or blog entries, it’s important to not create just one backup of your website, but periodic backups along the way as you make modifications. This way, even when problems present themselves some time after the code is broken, you can find the working version of any page and restore it down the road.
Backing Up Your Website Files
To back up your website files, you’ll need to use an FTP program like File Zilla to connect to your server. If you don’t know how to download files using FTP, you can learn how to do that on this site.
Connect to your server, create a backup folder on your hard drive with today’s date, and download everything into the folder. If you don’t know the FTP login info for your server, you can log into your hosting account and find that info, or simply create a new FTP user.
When you back up your files, don’t overwrite an older backup. Instead, create a new folder with today’s date and put the files there, so that one corrupted backup won’t render your other backups useless.
Backing Up Your Website Database
Once you’ve backed up your website files, you’ll want to back up your database if your website uses one. If you’re running an ecommerce site or use WordPress, CMS Made Simple or another content management system, your website uses a database.
To access your database, you’ll log into your hosting account and access what is called PHPMyAdmin. Log into your hosting control panel and look for databases and/or PHPMyAdmin. Once logged into PHPMyAdmin, select your database, hit “export”, and save the entire database as an SQL file.
If you need to restore your database, all you’ll have to do is click the “import” tab and provide this file. Once you’ve backed up your files and database, you can easily restore your website to its current working form in just a few minutes should problems arise.
How to Back Up a Website Hosted by a Third Party
Some people use third-party website builders to create their sites, and they don’t have access to their website files or database. If this sounds like your setup, you should start by asking your website provider for a backup of your files and database.
If your provider won’t help you create a backup, you can create a backup by hand. Assuming you own the rights to the content, images and design, you can create a backup by viewing each page and individually saving it using your web browser into a folder on your computer. Create sub-folders as necessary to match the structure of the website.
You’ll need to do the same for all of the images used in the website. If you can access the images folder and download the images directly, that’s great, but if not, downloading them one by one is an option.
If your website provider goes out of business and your website disappears, you can use the files and images you’ve saved to reconstruct your website. Even if a database was used, you can piece apart the files to integrate them into a new content management system in as little as a few hours, and get your website back online.
Don’t wait until something goes terribly wrong with your website — back it up today, and sleep easy.