Imagine you get up one morning and check your blog for new comments. But instead of your blog, you see a message that says, “Ha! This blog is hacked!”
Isn’t that horrible?
Sadly, this is something that can happen to any one of us. There are lot of cyber-criminals out there who do such things for fun or profit.
Last week, Jean wrote an excellent post, When Bad Things Happen To Good Bloggers. This encouraged me to write a bit about safeguarding a blog from hackers. The safest way to keep your data secure is to take regular backups.
In this post, I will discuss three ways to take backups of a WordPress blog.
Note Of Caution: Some of the following methods involve working with your WordPress DataBase and host. Make sure to proceed carefully as one wrong step can render your blog unusable. If you need help, you can contact me anytime. However, neither me nor Jean is to be held liable for any damage caused by instructions in this tutorial.
BlogBackupr is a free service that can backup your blog online. You do not need to download anything.
To register, you need to provide your blog address and email address. After registering, BlogBackupr will automatically take backups of your posts and images using your RSS feed. There’s a 100 MB storage limit but that should be enough considering that my 10 posts including images took 2 MB space. So, in 100 MB, I can easily store 500 posts. Not bad!
Pros: BlogBackupr is completely automatic. Set it up and forget it.
Cons: It can only backup posts and images. Also, the backups start from 10/20 recent posts (depending on your feed settings), and previous posts are still not safe.
2. WP DB Manager Plugin
DB Manager is an excellent plugin that can help you keep your DataBase in good shape and also back it up automatically.
Here’s how to set it up for automatic backups:
- Download and install the plugin from WordPress Plugin Directory. You can find the plugin here.
- After activating the plugin, you will see a new menu added in WordPress admin at bottom left side.
- Click on “DB Options” option.
- Now, you can set path to backup and number of backup files to store. Path to backup is usually /home/public_html/wp-content/backup-db . You can also change it if you want. Make sure that this directory is writable.
- Scroll below and you will see options for automatic backups. Here, set the backup frequency and set Gzip to Yes. (For those who are curious, Gzip compresses your backup file so that it does not occupy much space on server)
- Enter your email address in the field below. Now, along with storing files on the server, WP DB Manager will also send the backup file to you (it would be best to give your GMail address here! It would be a good use of 7+ GB storage space. It is recommended to set up a filter to automatically archive backup files).
Now, this would save you from a lot of work. In case anything goes wrong, all you have to do is restore the DB.
Pros: Automatic backups can save you from a lot of work, and since the whole DB is copied, all the posts and settings are taken care of.
Cons: It’s still not complete! If things go horribly wrong, you might lose your theme and need to install plugins from scratch (although the settings of plugins will still be safe).
This is the longest but most fool-proof method. This will backup all folders and files including the database.
Here are the steps to take backup using this method:
- Go to your cPanel.
- Under files, there is “Backup Wizard”. Take a look at the screenshot:
- Click “Backup” on next page.
- On next page, click “Full Backup”.
- Now, select the destination of backup file. This is where the backup file will be stored. You will also be asked for an email address to which notification of the backup will be sent.
- Once backup is complete, you can either download the zipped file or let it stay on the server.
To restore a previous backup, just select “Restore” from the first page of Backup Wizard and follow the instructions.
Pros: Complete backup ensures that everything is safe.
Cons: Takes more time. Downloading and storing backup files can be very large.
My Recommendations: I’d advise to set up WP DB Manager to take a backup on a weekly basis and store these in your GMail/Yahoo inbox and take a manual backup once a month.
These are three methods that can be used to backup your WordPress blog. Do you know about any other methods? Let me know via the comments. If you encounter any problems, just drop me a mail at contact (at) ishansharma (dot) com
Image Credits: Backup image from Wikimedia. Screenshots by me! 😉