If you have put time and effort into creating and running a blog do not put all that hard work in jeopardy by not backing it up religiously. Many of us; me included will be operating their sites on a free host provider – which should really get you motivated. Think about it; all your work, posts, images and assets are sat on a server somewhere (and I doubt that you would know where!) under the control of someone that does not even know that you exist. Your blog will be the last thing on their minds if something goes wrong!

So how do you do it quickly, easily and efficient manner. Well let me share with you what I do with my WordPress blogs that I run.

Backup up the database (1st priority!)

All WordPress blogs are pretty much contained in a database somewhere. All your posts, comments, mete data and user information is stored away in a database table. If you lose that; then I’m afraid that you will be started over from scratch.

There are a few ways in which you can do this; either directly through your web hosting provider using a tool like PHPAdmin or with WordPress it’s better to use a plugin.

My favourite WordPress plugin is WP-DB-Backup (http://wordpress.org/extend/plugins/wp-db-backup/)

Installing and configuring WP-DB-Backup

  1. Go ahead and download the plugin from http://wordpress.org/extend/plugins/wp-db-backup/ and save it to your disk.
  2. unzip the contents and upload the wp-db-backup folder to your WordPress wp-content/plugins directory
  3. Log into your WordPress administration area, and select ‘Plugins / Installed’ and then select ‘WordPress Database Backup’ and activate it.
  4. Now go to ‘Tools / Backup’ and configure the plugin to backup all your tables.
  5. I prefer to get the plugin to email me the database once a day. That way I know that I always have an up to backup and I know where to find it.

Backup up the files

Now that you have your database safely being backup up every day you should be happier in the knowledge that if you lose everything you can always get the database back – you would just need to re-install WordPress, themes and plugins and upload any images etc that you were using.

Remove that fear as well by ensuring that you backup the entire contents of your web host on a daily basis as well. This way you will never be without a complete backup to get you back up and working quickly.

Again there are numerous ways in which you can do this; and they will vary depending on the web hosting provider that you use; the level of access they provide to you and the platform upon which you are backing up to. In my case I only have FTP access to my hosting provider and I use a Linux (ubuntu) platform at home to provide file sharing and backups.

So the best way that I discovered was to run an automated download of the sites once a day using the following script:

#!/bin/sh
# WebSite(s) backup routine
# Uses wget to remotely download FTP only webservers – like byethost.com
# Written by David Baldaro
# ———————————————————————-

### Service Setup ###
ROOTDIR=”/directory/to/backup/too”

### FTP server Setup ###
FTPU=”your-ftp-username”
FTPP=”your-ftp-password”
FTPS=”your-ftp-server-address”
WGET=”$(which wget)”
LOGFILE=”/var/logs/website_backup.log”

### Other stuff ###
EMAILID=your@emailaddress.com

### Dump backup using FTP ###
#Start FTP backup using wget
cd $ROOTDIR
wget –recursive –level=inf –timestamping $FTPS –ftp-user=$FTPU –ftp-passwor
d=$FTPP –no-verbose –output-file=$LOGFILE

This script effectively uses WGET to keep a synchronised copy of the entire directory of my web host on my local server. I can either run this manually; or I can set it as a cron job so that it runs once a day in the early hours of the morning; so as to not effect my bandwidth during the day.

I hope that this helps someone save hours of trying to piece back their beloved blog!