I’m going to assume that you already know how important backing up your website or blog is, or you probably wouldn’t be reading this article. But if your website or blog is a self-hosted WordPress installation, your options are limited. Not impossible, just limited. There were and are several options for automatically backing up your database, but what about your files? I’m talking specifically about what’s in your ‘wp-content’ directory – your themes, plugins, and uploads. Losing your theme files is a big deal, especially if you’ve made any modifications to your theme. And your uploads directory contains everything you’ve uploaded, such as images and PDFs. Not the kind of stuff you want to lose.
Edit (September 11, 2017): Thanks to Paul at Art of Blog for letting me know about the broken link for BackupBuddy. Check out their article for more WordPress backup options.
Hey, there’s a plugin for that…
Introducing the Automatic WordPress Backup plugin. Install the plugin, link it to your Amazon S3 account, configure the settings, and forget about it. Seriously. Want more information before taking the plunge? Read more about the plugin at the developer’s website or at the plugin’s page in the plugin directory at WordPress.org.
Configure the plugin
After you’ve installed and activated the plugin, you’ll need to configure it. In the left sidebar of your WordPress admin screen, probably close to the bottom of that sidebar, you’ll see a heading called Volcanic. Click on that heading, or the link below it that says Automatic Backup, and the configuration screen should appear with the following options:
Textboxes or drop-downs that you will need to complete or select.
- AWS Access Key
- AWS Secret Key
- S3 Bucket Name
- Or create a bucket
- Backup schedule (Disabled, Daily, Weekly, Monthly)
If you don’t have an Amazon S3 account yet, you’ll need to set that up before you can finish this part of the configuration. See the next section in this post called “Linking with your Amazon S3 account” for that information.
Select boxes (checked for “yes,” blank for “no”)
- Parts of your blog to back up (select one, some, or all)
- Config file and htaccess
- Database dump
- Themes folder
- Plugins folder
- Uploaded content
- Delete backups older than one month
- Keep a monthly backup for one year
- Keep manual backups forever
For my purposes, I selected all the boxes, and set the schedule for “weekly.” For the record, there seems to be a small quirk in the plugin – I’ve got it installed on six websites and some of them are running weekly backups and some are doing daily backups even though the setting is “weekly.” Not really a big deal since Amazon S3 is so cheap anyway.
Support the developer (3 options)
You’ll have to select one of the three options. (I picked the “write a review” option.)
Next you want to choose either “Save Changes” or “Save Changes and Backup Now.” If you have just configured the plugin, then choose the second option to be sure that the connection with Amazon S3 is working correctly. After the backup is complete wait for a few seconds, refresh the screen, and the backup you just made should appear in the Download recent backups content area. You’ll be able to tell which backups are your manual backups because the word “Backup” will be appended to the front of the link title.
At the bottom of the screen is a section called Plugin Requirements with the current status details of your website and host server, telling you if this plugin will work on your system. My status details are all in green so I know I’m good to go, and hopefully yours will be too. You can read about the plugin requirements on this page, or you can just install it and see if you get the “green light.”
Linking with your Amazon S3 account
The “S3” in Amazon S3 stands for “Simple Storage Solution,” and it is cloud computing at its nearly-best. The service is incredibly cheap, and if you don’t have an account yet you can go to http://aws.amazon.com, and click on the button that says “Sign Up Now” – you’ll be glad you did.
Once you’re in, make your way to the AWS Management Console, and then to Account » Security Credentials. (You may have to sign in again.) Now you should see a heading in the main section that says Access Credentials, and look for Your Access Keys. One is your Access Key ID and the other is your Secret Access Key. The Secret Key probably won’t be visible, so click on the link that says Show and a popup will appear displaying that key. Now that you can see your keys, copy and paste them into the two textboxes at the top of your plugin screen in WordPress, making sure that you paste them into the correct boxes.
At this point you can create a new “bucket” in the plugin screen, or go back to Amazon and create the bucket there. Either way works. The term “bucket” is just Amazon’s term for a primary folder or directory, so don’t get too hung up on the strange terminology.
Organizing your Amazon bucket for multiple backups
Organization is a good thing, and if you’re backing up multiple websites using this plugin and your Amazon S3 account then the plugin takes care of that for you by creating a directory in your Amazon bucket called “awb,” and then a separate directory for each website that is being backed up. Pretty cool.
After you’ve run your first backup you should go to your AWS Management Console and verify that it’s working the way it should be. In the Console click on the Amazon S3 tab at the top left of your screen, click on the name of the bucket that you’re using to store your backups, double click on the directory “awb,” and then double click on the directory that is named after your website. In this directory you should see one or more of your backup files in a zip format.
So how do I restore my site?
Good question. Any backup method is only as good as its restore function. I looked through the plugin’s website and watched their tutorial video, but I wasn’t able to find any instructions for restoring a website using the plugin. Assuming you’re going to restore your website to its original location (host), this is the solution that I came up with:
- Download the latest version of WordPress from WordPress.org and install it following their instructions.
- When you create a database for this install, use the same table prefix as before (you’re not using “wp_” are you?), but feel free to change the database name, user, and password.
- Login to the admin of your new, barebones WordPress website.
- Before doing anything else go to Plugins » Add New and install the Automatic WordPress Backup plugin.
- Navigate to the settings screen for the plugin, enter the “keys” for your Amazon S3 account, and save the settings.
- While on the same screen, click on the Restore from a backup tab.
- Look through the available backup files for the one you want to restore from – probably your most recent backup.
- If you created a new database with different information than before, check the box that says “Keep your current database settings…”
- Click the “Restore from backup” button, and wait for the plugin to do its thing.
- Once it’s done, refresh the page, go to your Dashboard, or go to the frontend of the website and your site should be restored to its original state.
Truly a “set it and forget it” solution for backing up your WordPress website or blog.