Migrating My WordPress Blog to SQL Azure - SQL Azure Team Blog - Site Home - MSDN Blogs

Migrating My WordPress Blog to SQL Azure

Migrating My WordPress Blog to SQL Azure

Rate This
  • Comments 4

This week I decided to take on an interesting challenge and see what commonly available applications I could get running on SQL Azure and the Windows Azure platform.  I remembered a while ago that WordPress had started making significant investments in partnering with Microsoft, and I was really pleased to run across http://wordpress.visitmix.com.  Historically running only on MySQL, WordPress now runs on SQL Server and SQL Azure, utilizing the PHP Driver for SQL Server!  The site has great how-to articles of how to install this on SQL Azure, and how to migrate existing WordPress blogs to your new deployment.

WordPress is one of the most prevalent content management and blog engines on the web, estimated to have nearly 1 million downloads per week used by up to 12% of all web sites.  Coincidentally, my personal blog ran on WordPress and thought this was a fantastic challenge to get it migrated over to SQL Azure and Windows Azure.

I chose to implement this utilizing the Windows Azure VM role.  With an on-premises Hyper-V server, I created a virtual image of Windows Server 2008 R2 with IIS and installed WordPress.  The install wizard automatically implemented database schema, making the database portion of setup very easy.  During the setup wizards, all I had to do was provide the location and credentials for my SQL Azure database running in the cloud.  Walkthroughs of how to accomplish that are here.

Once I customized the settings and theme, I then uploaded and deployed the virtual image to Windows Azure - making this a complete cloud deployment of both runtime and database.  Everything works without having to make any compromises to get this into the cloud. 

Take a moment to check it out.  The address is: http://blog.stevenyi.com.  Right now it features my outdoor passions for climbing and photography - I'll start posting on some additional topics there in the future, too.

The last step was properly managing DNS entries to reach my blog via my 'vanity' URL instead of using the *.cloudapp.net address you assign when deploying a service in Windows Azure.  Not being a DNS expert, this had me stumped for a little while.  Windows Azure provides friendly DNS entries to provide a consistent way to access your instances to provide an abstraction layer from Virtual IP addresses (VIPs) which may change if you decide to deploy an application from a different or multiple datacenters.

Fortunately, one of the great things about working at Microsoft is being able to reach out to some very bright people.  Steve Marx on the Windows Azure team authors a fantastic blog on development topics at http://blog.smarx.com that explains this in more detail and how to map custom domains to Windows Azure using CNAME records and domain forwarding.  The post is here.  I did mention that I wasn't a DNS expert - so after reading the post, he still needed to call me to basically repeat the same thing. 

If you have a moment, check it out and hope you enjoy the pics.  Have a great weekend.

-Steve Yi

  • Hi Steve, how much you will pay for this implementation? 1 VM + 1 SQL Azure.

    If you have a small budget but you want to have your blog in the cloud because the cloud is wow. Where you will have mounted it? AWS - AZURE? why?

  • Hi Juan,

    I'm using an extra-small instance of windows azure and the web edition of sql azure.  for the most current pricing on that visit here: www.microsoft.com/.../popup.aspx

    having this in the cloud makes sense to me because i have compute and data resources committed specifically to this deployment, versus a shared infrastructure with dozens or hundreds of other deployments that could take my site down with theirs.  

    we'll be announcing some updates later this year regarding pricing that should address your concerns.  thanks!


  • Love your work Steve, I'm seriously considering the same thing. Love WordPress and love Azure, so makes for a perfect fit. I'm currently running http://techAU.tv on WordPress, but the site I'm focusing on atm is http://constructiv.co which is running on SquareSpace (I needed something quick). The good thing about SS is they let you export fairly easily, so getting to WP shouldn't be an issue.

    Thanks for the post. Very handy. I shared on twitter so others can benefit as well.


  • I tried following the instructions but my site keeps reverting to *.cloudapp.net and not my custom domain.  Did you have to change anything in WordPress to get this to work?

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 7 and 3 and type the answer here:
  • Post