Maria’s Guides

Support and additional material for readers of books, articles, and digital media by Maria Langer.


Random Book Cover #1Random Book Cover #2Random Book Cover #3Random Book Cover #4Random Book Cover #5Random Book Cover #6Random Book Cover #7Random Book Cover #8Random Book Cover #9

Automating WordPress Database Backups with WP-Cron

Posted on September 29th, 2006 at 6:00 am ·
Filed in: RSS WordPress Books   

Take all the effort out of backing up.

A few weeks ago, I wrote an article explaining how to back up a WordPress database. This is something that all WordPress users should be doing regularly.

But if you’re like me, you just don’t think about manual backups. I went through a spell where I backed up one of my databases every time I remembered to do so. That turned out to be once every month or two. With the sheer quantity of blog entries that appear on my blog-based Web sites, that’s a lot of content that would be lost in the event of a system crash.

Enter WP-Cron. This WordPress plugin by Scott Merrill is basically a one-trick pony: it’ll automate the completion of a task, performing it once a day. I use it with Scott Merrill’s WordPress Database Backup, which is part of a WordPress 2.0.x installation.

Keep in mind that WP-Cron (and WordPress Database Backup, for that matter) only work on a server installation of WordPress. If you’re using WordPress.com, the folks who run that server are backing up your database for you.

Setting up WP-Cron is simple.

  1. Download, install, and activate the WP-Cron plugin. (If you need help or more information about plugins, consult our WordPress book, which covers the plugin installation process extensively.)
  2. Log in to WordPress and open your dashboard.
  3. Click the Manage button in the first row of buttons. The Manage Posts administration panel appears.
  4. Click the Backup button in the second row of buttons. The Backup administration panel appears.
  5. Scroll down to the Scheduled Backups area.
    Scheduled Backups
  6. Beside Schedule, select Daily.
  7. Turn on the check boxes for each table you want to include in the backup. These are in addition to the blog-related database tables, which are backed up automatically. The tables in the list will vary depending on plugins. I usually turn them all on, although that can make the backup files large.
  8. Enter an e-mail address in the Email backup to box. This should be an e-mail address that can receive large files. (For example, my marialanger.com site backup file is about 1.8 MB.)
  9. Click Submit. After a moment, the screen should refresh with a message at the top saying that your options have been saved.

From that point on, around midnight your WordPress database will be backed up and e-mailed to you. You’ll get these backup e-mails daily, so you want to be sure to check your e-mail at least a few times a week. I usually keep the last two backup e-mails for each of my blogs and discard the others. Be sure your e-mail is set up to remove messages from the server when they are deleted or you may quickly fill up your allotted e-mail space on your ISP’s server.

My only gripe about WP-Cron is that you can’t set the backup period. Although daily is a good option for MariaLanger.com, which can get up to 10 new posts a day, it isn’t necessary for my wickenburg-az.com blog, which gets, on average 2-4 new posts a week. I’d like to be able to set a custom backup period for each blog to minimize server workload (although it isn’t my server anymore) and delivered e-mail.

Otherwise, WP-Cron is a must-have plugin. I highly recommend it for anyone who is serious about keeping their blog content safe.

Technorati Tags: , ,

 • Read 363 Times
Add to Del.icio.usAdd to Del.icio.us • Technorati ThisTechnorati This • Digg ThisDigg This • Stumble ItStumble it! • Twit ThisTwit This


 

 

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

If you have a Gravatar, it will appear beside your approved comment.
No Gravatar? Get one free!