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.
Paul Buijs says
Hmm, Have this working on one site hosted by GoDaddy and not for another site hosted by HostGator. Figured it would be the other way around…On the non working site the plugin can create a bucket within S3 but never adds backed up content even though the plugin said a backup was created. Scratching my head. obviously the S3 settings and connection are not the issue. Any thoughts?
John Sundberg says
Not sure what to say about that, though I’d probably start with reinstalling the plugin, and from there? Are you running the current version of WordPress? Beyond that, the techs at HostGator would be your best bet, I should think. Maybe check the error logs in your HostGator cPanel too.
I did a quick Google search and found this article among some others on the subject, so it appears that some folks are able to connect their S3 account in a way that works. (http://www.thebloggersbulletin.com/2010/08/15/backup-wordpress-blog-upgrade-lesson-learned-2/)
By the way, I like the pull-up bar locator on your website!
idApostle says
Paul, this site had a fix that worked for me. ONe of my sites was fine, the other worked only after this small edit:
http://www.clickonf5.org/wordpress/solution-for-wordpress-php-error-maximum-execution-time-of-30-seconds-exceeded/11921
John Sundberg says
Steve, thanks for the link.
Allan Hoffman says
This is a completely awesome, clear, thorough and well-written tutorial. It really helped me a lot. Thanks so much!
John Sundberg says
You’re welcome, Allan, and thank you for taking the time to leave your comment! Glad you found it helpful.
Mick Holmes says
Hi, cheers for the info.
I followed the steps for set up with S3 but after I press Save Changes on my WP “S3 Backup” page, 3 warnings come up:
– S3::getBucket(): [AccessDenied] Access Denied in … on line 132
– krsort() expects parameter 1 to be array, boolean given in … on line 192
– Invalid argument supplied for foreach() in … on line 194
I have no clue what these are – can you give me any idea?
John Sundberg says
No clue on those warnings, Mick. Have you made any progress on it yet?
Veraison Design says
Nice article, simple and effective!! I agree everyone should have an S3 setup. Keep up the good writing.
John Sundberg says
Thanks!
Michael Foliot says
I cant get automatic backup to recognize the bucket i created in S3? What do i do?
John Sundberg says
Michael,
Did you find a solution yet?
I’d need more information than that to be able to help. If you’d like me to take a look behind the scenes, you can send me your login information using my contact form – it’s a secure connection.
Other things to try: make sure your AWS Access and Secret Keys are correct; or try creating a bucket using the plugin.
John
Rick Smith says
Johh, I am trying to get ahold of someone to help with this plug in. I sent in an email and got a reply from “marvin’ saying it isn’t supported? I”m a bit confused.
John Sundberg says
Hi Rick,
I think support for this plugin has always been spotty at best, and probably nonexistent in reality. After I wrote this post I discovered BackupBuddy and have been using that on all my WordPress sites.
BackupBuddy is a premium plugin, but it really is worth the $75 price tag, especially if you value your site and all the work you’ve put into it. If you’d like I can install a licensed copy of BackupBuddy on your site and configure it for $100. You can use my contact form if you want to pursue that option.
If you still want to keep trying with the Automatic WordPress Plugin I might be able to help, depending on what it’s doing or not doing.
John
Rick Smith says
Thanks, I was actually looking into backup buddy. It looks great, but I was hoping for a free option.
(By the way, if the plugin is 75 dollars, why would I pay someone 100 bucks for it?) ha,ha. 🙂
John Sundberg says
Free options are nice until they stop working and the support doesn’t exist. 🙂
Not everyone is comfortable installing and configuring plugins, and for them an extra $25 is probably a bargain. Time is money (sometimes), and we all need to pay our bills and keep the lights on…
Rick Smith says
Ha,ha. wow…wordpress makes it super simple. You don’t even have to use ftp to install and configure plugins. 🙂
Lior Aviram says
I tried to restore (following the steps written above) and I get the message “The restore is running. Please be patient. This page will refresh once the restore has completed.” and then nothing, any ideas?
John Sundberg says
Lior,
Not sure about that one. What happens if you manually refresh the page?
Lior Aviram says
Comes up normal, as if nothing happened