How to make your blog independent from your hosting


Over the years of hosting this blog I have changed several hosting providers. I had actually started this on Blogger a long time ago and then I decided to host it myself using WordPress.

I played around with DasBlog as a blogging engine (not too successful I got at that). After moving to WordPress, I shifted a couple of providers before settling on my current provider (BlueHost). I recently renewed my hosting contract with BlueHost. I would have liked to change my provider because the amount of money I had to pay for renewing was a lot more than what I had originally paid. But there was one thing that kept me from moving – the inertia of backing up everything, and then uploading it at the new hosting provider.

The backup itself is not troublesome. What is painstaking is downloading the wp-content folder which contains all the images (or other files) that I have embedded in my posts over the years. And with every passing post, this folder becomes heavier and heavier. So, I decided that I had to rid myself of this artificial dependence that I have developed on my hosting provider. (I do backup my blog database regularly, but the content folder only gets backed up once a month).

The answer in one word for all my problems: Amazon S3.

Thought Overview

If you follow the link, you will come to see that Amazon S3 is a storage service offered by Amazon. Why I chose this over any number of other service available for this purpose is something that I probably cannot answer (and you are free to make your own choice as the concept remains the same).

My thought process was this:

  1. Whenever I need to embed a picture into a blog post, I upload it to Amazon S3 first.
  2. Then I use the Url from Amazon to embed the image in my post.
  3. So, now if I have to move my blog I don’t have to worry about the wp-content folder because it would be empty.

I went ahead and signed-up for an account on the Amazon S3 site. The great thing about Amazon S3 is that you have to pay only for bandwidth and storage that you use and since that won’t be a lot in my case, I don’t mind the additional cost right now (which is not too much anyway). Here’s what I will have to pay:

  • $0.15 per GB per month for storage.
  • $0.1 per GB of Data Transfer In
  • $0.17 per GB of Data Transfer Out
  • $0.01 per 1,000 PUT, POST, or LIST requests
  • $0.01 per 10,000 GET and all other requests

All together, based on traffic trends on my site, my yearly expenditure will come up to $3-$5 (unless I get Dugg or something which will never happen). This is less than what I would have saved if I could have changed my hosting provider.

How did I set it up?

Ok, so I do you set this up? Well, I had to do a number of things actually (and not all the steps may apply to you).

DNS Independence (optional) – One of the optional steps for making this move (that I will describe below) requires making changes to your domain DNS records. Now, to make any changes to these records at my current hosting provider, I would have to raise a support ticket every time. To me, that is kind of lame. I seldom get time to work on these mini projects of mine, and it is not acceptable to have to wait while some support tech is taking forever to make a simple change to my DNS records.

So I decided to take care of my own DNS needs. I created an account at DNSMadeEasy. This is a DNS hosting service which allows me to manage my DNS. I simply pointed my domain registrar to use DNSMadeEasy servers as my Name Servers, and then I setup the DNS records for my domain (gadodia.net) to point to my hosting provider.

This is something that is totally optional for someone who is not comfortable working with DNS records. In this case, you are better off dealing with your hosting support.

Amazon Buckets – the next thing to do after you have setup your Amazon account is to create buckets. Amazon doesn’t provide a folder structure to organize your files. At best you are allowed to create buckets which allow you to segregate your files into different slots. However, beneath a bucket, its a flat structure.

A number of tools are available in the market which allow you to simulate a folder hierarchy under a bucket and the two I use are S3Fox (a FireFox plugin) and S3 Backup (a windows application). Both are excellent tools (I use S3 Backup for bucket management, and S3Fox for everything else).

I went ahead and created a bucket called “images.gadodia.net”. What this does is that makes available the following Url: http://images.gadodia.net.s3.amazonaws.com. Using this Url, I would be able to access any image I upload into that bucket.

By default any file you upload to Amazon has permission denied to everyone. However you can edit those permissions very easily by using S3Fox.

Pretty Urls (optional) – well, now that I have created a bucket, and I can upload images into it, and I can access these images using a Url, I want to make my Url prettier. I want the images to be accessed by simply using http://images.gadodia.net.

To do this, I need to create a CNAME DNS record for my domain. And that’s what I did. I created a CNAME record ‘images.gadodia.net’ which points to ‘images.gadodia.net.s3.amazonaws.com’. This allows me to access my images using a prettier Url (take a look at the Url of the image in this post).

There is another added advantage of this approach. If tomorrow I decide that I want to move away from Amazon as my image hosting service; I can do so easily without the fear of breaking anything in my blog. I can simply reconfigure my DNS to map images.gadodia.net to the new location of my images and ensure that i copy over the same structure of files to the new location. My blog will continue to run.

The Disadvantages

There are some disadvantages as well:

  • Extra Cost
  • Having to remember to setup permissions for every file that i load (it becomes second nature after a while).
  • Overall, the posting workflow becomes slightly more tedious as additional manual steps have been added to it.

But overall, I am happy because now I have a peace of mind when it comes to my blogs.


13 thoughts on “How to make your blog independent from your hosting”

  1. Incidentally, while I was mucking around with the DNS settings, I had accidentally taken my blog offline for a couple of hours…

    Google decided to visit right then. And now I have over 150 errors in my WebMasters Control Panel (Domain Not Found).

    And I also noticed that my Page Rank is now 2 instead of 3.

  2. Messing DNS settings can destroy your blog fairly quickly. I am trying to setup my wordpress blog on Amazon but I don’t know how to do it. What would you recommend?

  3. @Shortshire – Wow, if you are thinking EC2, then you must be having a lot of visitors. I do have a little know how on EC2 deployment (because of stuff I did for work). Why don’t you mail me what you are looking to do, and I can help you out…

  4. This is EXCELLENT stuff. Thank you for telling us how it might be done.

    As a newbie to site building, it would be great if you’d do an encore and include a few links to tutorials that will actually walk you through some of the more arcane details. Otherwise I’ll be Googling all day for a week!

    Thanks again for this write-up.

  5. Thanks for this post. I’m currently being hosted by BlueHost and so far, they seem to be quite good. I’m not sure, though, what other people think about the specifications of the hosting plan they offer, as with other web hosting companies, you may get more.

    1. You are right. There are WordPress plugins available for this – however, I am yet to find one that works flawlessly. There are even LiveWriter plugins available for this, again not working the way I would like them to.

      I don’t blog that often, so it worked for me….. for a while.

      I don’t use this anymore – as you rightly said, it did become too tedious to do it manually and so I simply let it upload to my hosting for now.

Comments are closed.