How I backup my blog

If you host your own blog (as compared to using a blogging service such as wordpress.com), then the burden of backing up the blog falls on you. And if you don’t backup your blog, you are going to pay for it the day it fails.

Here’s how I backup my blog (it’s very simple, really). Here’s what you need:

  1. Install the WordPress Database Backup plugin.
  2. Figure out from your hosting provider, how to access your account through SSH, and have your username and password ready.
  3. Download putty.

In addition, you should be a little comfortable with command line access to your server. And here we go.

Step 1: Backup Your Database

With the plugin installed, this is easy as it can be. Just follow these steps:

  • Go to your WordPress admin panel, and find Backup under Tools in your admin panel. This lets you access the plugin options.
  • Select the tables that you want to backup. The plugin automatically selects the core tables and lets you choose any plugin tables that you want to backup.
  • Under backup options select “Download to your computer”, and click “Backup Now”. Depending on your DB size and the number of plugins you have, this process may take a while, but the plugin shows you a nice progress bar.
  • Download the generated file and save in a safe location.

Step 2: Backup Your File System

The next thing to do is to backup your files. Normally, you may only want to backup your uploads and themes directory, but I prefer to simply backup the entire blog. Its only an extra few MBs, and this way you can simply restore your blog in one shot, if needed.

In order to make this part easy (compared to using FTP to get to your files), I recommend the use of SSH. Fire up putty (or any other tool or console to get SSH access on your server).

Note that different hosting providers have different rules for allowing SSH access. I had to have mine enabled by sending a photo ID proof to the support. I use BlueHost as my provider.

Once you have used SSH to login to your account, you should change your directory to one level above where your blog is situated. This is usually something like public_html, or something similar.

Once you are at that level, issue the following command:

tar -cvzpf backup.tgz public_html

Of course replace public_html by the name of your folder. What this command essentially does is that it takes the entire folder, and packages it in a tar file, and then compresses it using gzip into one compressed version of your entire file system for your blog.

Now simply download this file over, and save it where you saved the database backup. And that’s it, you are done.

Once you get the hang of it, its a very quick and painless process.

If you enjoyed reading this blog, consider subscribing to the RSS feed. You can also subscribe to it by email. You can also follow me on Twitter. Thank you!

If you found this content helpful, then please help by linking to me. You can also help me by sharing the content using any of these nifty buttons above. Thank you.



You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses to “How I backup my blog”





Leave a Reply