I emphasized the importance of backing up in my basic security tutorial, but I discovered all of the backup tutorials I found were out of date. So here’s a tutorial on backing up your WordPress database with the terrific WP-DB-Backup plugin. The great thing about this plugin is that you can have it automatically send you backups by e-mail that you can save both to your local computer and optionally store in your Gmail or other web mail account and an additional off-site backup.
This tutorial assumes you already know how to install plugins.
This tutorial should be forward-compatible with WordPress 3.0
1. Install WP-DB-Backup by Austin Matzko
2. Mouse over Tools so that the down arrow appears
3. Click the down arrow
4. Click Backup
5. You’ll see something like this:
On the left are the default database tables included with WordPress. All of these are included every time you backup. The only thing you have to decide here is whether to exclude spam comments from being backed up (I recommend this) and whether to exclude post revisions (I recommend excluding these too, unless you have a specific reason for keeping revisions).
On the right is a list of additional database tables, most of which were probably created by plugins. There’s also a table called that will end with the name “commentmeta” – this can be used by plugins.
If your plugins have created a lot of data that you would like to save, or you’ve spent a lot of time configuring particular plugins, you’ll want to backup these tables. Otherwise, you can keep your database backups smaller by not checking them.
7. Next we see the Backup Option. There are three choices here:
A. Save to the server
This will save a backup of your database as a file on your web server. I don’t recommend this.
B. Download to your computer.
This will create a database backup file that you can save to your local computer.
C. Email backup to:
This allows you to send a copy of the backup to any e-mail address you’d like.
8. Let’s go ahead and download a copy to our hard drives now.
Check options you want in the Tables section then click “Backup now!”
You should see a progress bar, and when that’s done your browser will prompt you to save the file. You can save this file wherever you’d like.
9. There’s another section called “Scheduled Backup.” This is where this program gets really great.
Here we can schedule a backup to be e-mailed to a particular e-mail address however often we’d like. I recommend checking selecting “Once Daily.”
10. On the right, you’ll see that list of optional tables again. Check the ones you want to backup every time the backup runs.
11. Enter the e-mail address you want the backups delivered to in the “Email backup to:” field.
12. Click “Schedule backup.”
13. You should now get a backup file as an e-mail attachment every day. You should save these attachments to your local computer. If you’re using Gmail or another web mail host that has a lot of storage space, you might want to leave your databases on their server as an additional off-site backup. Be aware that that’s an additional security risk – if your e-mail account is ever compromised, the would have access to all of your database backups.
I really love having a gmail account for each blog I run and using WP-DB-Backup to send those backups automatically. I download one from MySQL and one from WordPress as XML every week too in addition to that. This is a great tip and I absolutely recommend it to everyone.
Great recommendation Klint, WP-DB-Backup is the one essential plugin that I add to each WordPress install I do.
Most of the sites I do are for small businesses and consist of mostly Pages which don’t change very often. So I generally go for weekly backups to keep my gmail account from filling up too fast.
One handy tip for using gmail to store database backups is to setup a filter which labels the backups, marks them as read, and archives them so that you don’t have to mess with them unless you need them later.
I used it before, but not anymore. I choose to use phpmyadmin to do backup now.
i am using this plugin now and I love it. Its simple and easy to use.
I like this plugin, it seems to work well. However, there’s one irksome problem. There’s this big red warning at the top of my blog that says Your backup folder MIGHT be visible to the public. To correct this issue, move the .htaccess file from …” Well, I moved the .htaccess file, and I’m still getting the error message. I don’t know how to make it go away, and make sure that I made the modifications necessary. Any ideas?
Like Ryan,I also love having a gmail account. It can be used in a lot of “Google” things like this one, google analytics, google keyword tool and many others. Thanks for this update.
Pretty good!
But what about restoring a backup of those? Could you lead me to the tutorial on restoring a WP databae?
Thanks.
You have to go into phpMyadmin to restore databases. Instructions are here: http://wordpress.org/extend/pl.....ackup/faq/
An alternative plugin might be to use WP-DBManager http://wordpress.org/extend/plugins/wp-dbmanager/ to back up and restore databases.
Yep, what Gestroud said. I might do a tutorial on restoring next, though.
I use WP-DBManager coolest plugin for backing up the data base.
Regards
I don’t understand the need for plugins to generate backups. Why not just backup the entire DB onto a non-public folder?
/usr/bin/mysqldump -h your.db.host -u user -ppassword --databases my_blog_db >~/MySQL-backups/my_blog_db_dump-`date +"%Y%m%d"`.sql
Then you can easily restore the whole thing in a single step should you be hacked or end up with a corrupted installation.
Have you tried the new backup plugin named “WordPress Backup to Dropbox” by Michael Dewildt. I use Dropbox regularly for my most important information and therefore it would be a good idea to collect all of it in one place. I like the idea but would love to hear you approve it before installing and ending up without backup.
Have you tried using Backupbuddy? I use it extensively on any of my blog. Backupbuddy combined with an Amazone S3 account do give me a sense of security atleast.