Storing WordPress Blog Images in Azure Cloud Storage
Put your mouse over the image below, and take a look at the URL for the image.
If you look at the domain in the URL, you’ll notice it’s not www.cloudydeveloper.com. The image is not hosted on the same box running this WordPress site. Instead, it’s hosted in my Azure storage account thanks to the new Windows Azure Storage for WordPress plugin. This plugin allows images and videos to be stored in Azure “blob” storage which is super cheap. While I’m nowhere near hitting the storage limit for this Azure web site, I like the idea of getting larger media assets in a more suitable location and at $0.12 a GB a month, I’m not concerned about breaking the bank in the near future.
Here’s how I set this up:
- Install the plugin.
From the WordPress admin console, I just searched for the plugin “Windows Azure Storage for WordPress” and installed it.
- Configure the plugin.
In the settings tab of the WordPress admin console, click on “Windows Azure”. You’ll first need to create an Azure storage account to hold your media assets and have the name of the storage account and access key handy. In the screenshot below, I’ve already set this up and created a “container”, which is like a folder for storing blobs, named “images”, but if I hadn’t already done this, you’d see the ability to create a new container from this screen.
- Enable XML-RPC publishing in WordPress.
Again, in the WordPress admin console, go to Settings –> Writing and enable this.
And that’s it.
I use Windows Live Writer to create my blog posts and I just include images just like I did before and on publish, the plugin uploads the images to my Azure storage account and generates the correct URL. No extra work needed on my part. Awesome.