kevinleary.net

Backup Everything in Your WordPress

One often over­looked, very impor­tant step to set­ting up a Word­Press web­site is cre­at­ing a solid backup process. Here’s a nice setup I’ve found to be the best for my cir­cum­stances. I wanted some­thing that would backup every­thing, by every­thing I mean:

  • Plu­g­ins
  • Uploads
  • Themes
  • All Con­tent (data­base backup)

Backup Your Word­Press Data­base (all of your content)

First and fore­most let’s backup our data­base, where all of the con­tent cre­ated with Word­Press is stored. I’ve found that the DBC Backup plu­gin is by far the best for this. It let’s you auto­mat­i­cally backup your Word­Press data­base and store a copy on your web server. Many oth­ers will sim­ply email you a copy.

Fur­ther­more it will allow you to set an expi­ra­tion for each backup so that you don’t accu­mu­late too many back­ups. I have kevinleary.net set up to store back­ups for 14 days, and delete any­thing older than that. This way disk space will never be an issue.

Best of all it’s 100% auto­mated, fol­low the install instruc­tions and you’ll be on your way.

Backup Your Theme Files, Plu­g­ins and Uploads

For this I use the Word­Press Backup plu­gin. This plu­gin will backup the upload direc­tory (images and media), the cur­rent theme direc­tory, and the plu­g­ins direc­tory, store them all in a zip file and place that ZIP file in a loca­tion on your server (that you can set). Zip files can also be sent to email if you like.

Like the DBC Backup plu­gin you can also set an inter­val for it to run auto­mat­i­cally. I’ve set mine to 1 week.

The one caveat to this plu­gin is that it doesn’t auto-delete files that are old, so if you set it to do auto­matic back­ups, it will start eat­ing up stor­age on your server. Because the uploads and plu­g­ins direc­to­ries can get rather large, the space can add up quickly so pro­ceed with cau­tion on this one.

Off­site Backup for Extra Security

If you really want to be on the safe side, you can store data­base back­ups on your server and backup your files to Ama­zon S3. Ama­zon S3 (Sim­ple Stor­age Ser­vice) is an online web stor­age ser­vice offered by Ama­zon Web Ser­vices. At the time of this writ­ing it costs $0.150 per GB for the first 50 TB / month of stor­age used. If you use more than that it decreases in incre­ments of $0.10 per GB.

To auto­mat­i­cally backup your files to Ama­zon use the WP S3 Back­ups plu­gin. If you use the DBC Backup plu­gin to store your data­base back­ups in one of the fold­ers backed up to Ama­zon, then you’ve effec­tively backed up your entire Word­Press setup to an incred­i­bly reli­able off­site stor­age facility.

Right now there is lit­tle to no doc­u­men­ta­tion on the Ama­zon S3 plu­gin for Word­Press, and it requires a linux host to use. Hope­fully in the future this plu­gin will really take off, it’s incred­i­bly valuable.

Right now I can­not say what aspects of the blog it will backup to the Ama­zon S3 servers because it isn’t doc­u­mented and I can’t for the life of me find the author’s, Dan Coul­ter, email.

Like all things Word­Press there is no right or wrong way to do some­thing. How do you backup your Word­Press website?

4 Comments

  1. jimspencer / 6.30.09 / 3:57 AM

    I was inter­ested in the DBC Backup until I noticed the ver­sion, com­pat­i­bil­ity and age of the last update of the plu­gin. # Last Updated: 2008–5-8
    # Requires Word­Press Ver­sion: 2.5 or higher
    # Com­pat­i­ble up to: 2.5.1
    Do you remain keen on this plu­gin and do you expect it to work well on future versions?

  2. kevinlearynet / 7.3.09 / 3:26 AM

    Very good point Jim, I’ve actu­ally been hav­ing trou­ble with time stamps and ver­sion 2.8. I’ll prob­a­bly end up re-writing this post once I find a bet­ter solution.

    Unfor­tu­nately I haven’t been able to find any­thing that’s as auto­mated as this, and stores to the server instead of send out an email. Do you have any sug­ges­tions? What do you use?

  3. kevinlearynet / 7.3.09 / 3:26 AM

    Very good point Jim, I’ve actu­ally been hav­ing trou­ble with time stamps and ver­sion 2.8. I’ll prob­a­bly end up re-writing this post once I find a bet­ter solution.

    Unfor­tu­nately I haven’t been able to find any­thing that’s as auto­mated as this, and stores to the server instead of send out an email. Do you have any sug­ges­tions? What do you use?

  4. jimspencer / 7.3.09 / 3:39 AM

    I have noth­ing. But, if you have a plu­gin here that works really well on older ver­sions, it might be worth­while to do what is nec­es­sary to get the plu­gin com­pat­i­ble with the most recent ver­sions. It can’t be that much cod­ing. The server side stor­age is a good fea­ture. Although, hav­ing an off-site (email to a gmail acct.) com­po­nent to the backup solu­tion pro­vides a nice safe-guard.

Leave a comment

will not be published

Wrap code blocks with <pre lang="LANGUAGE" line="1"> and </pre> where LANGUAGE is a GeSHi supported language syntax.