How to migrate and run your WordPress blog on Windows Azure WebSites
I was testing Windows Azure Web Sites (Codename Antares, for short WAWS) for about 3 weeks before it was announced two days ago at MeetWindowsAzure. Since the beginning I wanted to migrate my blog from WordPress.com to Windows Azure Web Sites so I can have more control (on the blog) but enough abstraction (hosting etc.). Sound cool, right? Well WAWS does exactly that. Follow the process below to create your own web site to host the WordPress engine and also assign and use a custom domain on the environment. I’ll also include some description about the migration steps I did from WordPress.com to WAWS, like export/import of blog posts and installing some plugins to achieve similar functionality with WordPress.com
Creating the Web Site
Creating your Web Site it’s really easy and fast on Windows Azure Web Sites.
As I want to use a WordPress engine powered blog, I can choose “From Gallery” and get a list of ready-to-use Web Sites
All you have to do after that is give a name to it and let Windows Azure Web Sites do the rest for you, like create a MySQL Database, install WordPress and configure it for you. The whole process takes 10-12 seconds. After the provisioning of the Web Site, you can Browse to it. In our case you get the setup page of WordPress asking for an admin username and a password. Fill that information and of you go, your blog is ready.
Migrating existing content
WordPress is really helpful in this case as it has a special plugin only for that reason. By going to Tools -> Export on your existing WordPress blog, like mine hosted on WordPress.com, you can export to an XML file containing references for the Import engine of WordPress. Once, you logon to your Windows Azure Web Sites admin panel, you can navigate to Tools -> Import and then select the file you exported from your previous blog. You can then proceed with the import of all your content to your new blog. Mine took about 2-3 minutes to import everything.
Missing plugins/Similar functionality to WordPress.com
If your blog was hosted on WordPress.com there is some functionality that doesn’t exist on the installation we just did on Windows Azure Web Sites because the plugins are not included. Site stats for example or a couple of Widgets are not there. To include all that functionality WordPress has released a plugin called “JetPack” which includes all that functionality for your hosted WordPress site. All you need is an existing WordPress.com account to link your blog with the WordPress Cloud as they call it.
Creating the DNS records
You need to create the necessary DNS records for your site in order to point to the WAWS site. WAWS assigns to you an address of the <your_name>.azurewebsites.net format. For example this blog is running at http://kefalidis.azurewebsites.net but it’s accessible from http://www.kefalidis.me. I’m hosting my DNS records with GoDaddy so they look like below.
My www is actually an alias (CNAME) to the WAWS address.
Making Windows Azure Web Sites understand your custom domain
After you create the CNAME record and your site now points to the WAWS address, you need to make WAWS understand about your custom domain, otherwise sites running e.g. on WordPress won’t be accessible on the custom domain. To achieve this we have to logon to the Windows Azure Portal and go your Web Site. After you do that you have to click on the “Scale” tab and switch from Shared to Reserved mode.
That way you enable the option to use a custom domain header on your Web Site. Next step is click on the “Configure” tab and insert your custom hostname.
One last step left is making your WordPress site, listen and respond to the custom domain. In order to do that, you have to logon your Administration panel, click “Settings” and then “General”. There you have two options the Site Url and the WordPress URL. Make them both listen on your custom domain just like I did.
Now your Web site is accessible from your custom domain
The whole migration took my about an hour and was mostly setting up the things/plugins for my WordPress than it was WAWS preparing the deployment. The experience is really fast and responsive, I love the new UI on the portal and I hope you do too.
Any comments/remarks/questions are, as always, welcome!