Here’s a scenario that will chill the hearts of seasoned WordPress developers.
You’re new to WordPress, and, as the new year begins, you decide it’s finally time to get to work on the idea for an web site that you’ve been nursing throughout 2013. Naturally, you choose the world’s most popular content management system as the foundation on which to build your site. You get to work, install a theme and a bunch of plugins, modify the theme to suit your needs, write and upload all the content, and for a few months everything is ticking along fine. Then, disaster strikes. You visit the site one day and see nothing but an error message. Or, perhaps you get a message in Google’s Web Developer Tools that tells you that your site is serving malware — you’ve been hacked.
If you’ve got up-to-date backups, this scenario is annoying, but not a big deal. You can blow the old site away, reinstall WordPress, restore from the backup, and you’re good to go. If you haven’t got a backup, then you’ve got a lot of work ahead, combing through the site’s PHP files and MySQL database to root out the malware, or, in the worst case scenario, your data may be irreparably damaged and irretrievable. That’s months of work gone. Take it from one who knows, there’s nothing more disheartening that seeing months of effort go up in smoke because of a security breach or experiment that went wrong. Many sites never recover.
The lesson here, in case it isn’t obvious, is that devising a backup plan should be right at the top of your priority list when embarking on a new online project. It’s very easy to do, and the potential cost of not having a backup is high.
WordPress Is Not The Files Alone
Not long ago a friend came to me and asked me to help resurrect a WordPress site. She had accidentally deleted the MySQL database. She said she had a backup, but when I took a look at it, my heart sank. Her “backup” strategy was to simply copy the site’s folder off the server and onto her laptop. This is a mistake made by many neophyte WordPress users.
A WordPress site is made up of two different components, the files in the web server directory and the database. Most of the important information is held in the database. Without the database, the site is gone.
Backing Up A WordPress Site
It’s relatively simple to back up a WordPress site, and there are a number of different strategies that WordPress users can employ. I’m going to have a look at three.
VaultPress
VaultPress is a WordPress backup service from Automattic, the company behind WordPress.com and various other tools, including Akismet. It’s not free, but it’s the easiest way to get regular and reliable backups of a WordPress site. The service also includes a very handy security scanning component, which will help WordPress users make sure that their site is malware and vulnerability free.
BackUpWordPress
If you don’t want to be tied to a particular backup service, then BackUpWordPress is a great option. It’s fairly simple to use, and gives you the option to create a customized schedule and back up to host of different cloud storage services, including Amazon S3, Google Drive, Azure, and DropBox. It can even email you the backup.
Manual Backup
If you prefer to handle things yourself, you can do a manual backup. Remember, to do this you’ll have to copy the files that make up the site and dump the database. I’m not going to cover dumping the database in detail here, but there are several options for doing this. In all likelihood, your web host includes MyPHPAdmin, or an equivalent as part of its control panel. You can use that or you can brave the command line and dump the database using MySQL’s command line tools. This option is probably best avoided by people who are new to WordPress, web hosting, or the Linux command line, as there’s scope for things to go wrong.
Verify Your Backups
Having a flawed backup is worse than having no backup at all, because it gives users a false sense of security. Each of the methods we’ve discussed makes it fairly easy to carry out a test restore of the site on a different WordPress installation. It’s more than likely that it will work, but it’s better to be safe than sorry.
If you plan for the worst, and keep an up-to-date backup of your site, you’ll never have to experience the heart ache of losing your hard work. It takes next to no time to devise a back up strategy, so if you don’t, you only have yourself to blame when things go wrong.
About John- John Mack is a technical writer for Datarealm, one of the oldest web hosting companies. You can follow Datarealm on Twitter, @datarealm, Like them on Facebook, and check out more of their web hosting articles on their blog, http://www.datarealm.com/blog.