I migrated my guitar blog from Wordpress.com to Microsoft Azure today.  After some rooting around the Web for guidance and ending up down some overly-complex blind alleys I eventually discovered that it was fairly easy.  I’d say that it’s not for the total layperson – you’d need some tech/geek savvy, but it wasn’t exactly difficult even for my slightly out-of-date web dev chops.

I started with the following article: Deploying a Wordpress Blog on Microsoft Azure and recommend this as the starting point – of course you need to have the WordPress application installed on your Azure instance, so this goes through the basics of those steps.

The gotchas start to show themselves during the migration phase, i.e. transferring over the blog posts and images and metadata from your existing WordPress site.  The article How to migrate and run your WordPress blog on Windows Azure websites got me over this next hump and shows how in the WordPress admin console you go to Tools -> Export in order to get an XML file that contains the info your destination instance will require to import.

Here’s where it gets a bit hairy.  On your destination site, once you have done the famous five minute WordPress creation you now need to do the import of the data (the XML file above) but I encountered the error “The uploaded file exceeds the upload_max_filesize directive in php.ini”.  It turns out that the default max file size is 2MB which turns out to be a little inadequate (my XML file was 3.6MB and my blog isn’t exactly huge).

Hence, I started on the road to trying to find out how to change the upload_max_filesize setting in php.ini. Turns out this isn’t easy to do – I didn’t have access to php.ini and began on the hunt for where the file would be located when I came across the following forum thread Adjust php.ini settings (equivalent) in Azure Website Preview which gave the sage advice to upload a .user.ini file to the root folder of the website with the desired value of the upload_max_filesize (I increased it to 10MB)

OK. I’m gonna do that – which means I would need to FTP into the site. But where? With what credentials?   These are shown in the Azure management portal.  You click Websites at right then click on the name of the website, and then at the top, go to the dashboard view.  It lists the FTP Host names down the right.     What do I log in with? Well, I futzed around with this for a while before I came across the following post on Deployment Credentials which gives a very good and clear description and explanation of the differences between User and site-level credentials and when to use what where.   The final caveat being neatly highlighted at the bottom in that the user name *must* be preceded by the website name (I was cursing for about 20 minutes before I discovered this post).

OK. So I created my .user.ini file in Notepad, finally logged in using Filezilla and uploaded it into the root. Restarted the website, went to the wp-admin page, hit Tools -> Import and selected my XML file I exported from the source site at WordPress.com.  It took a couple of minutes to do it and then told me to “Have Fun”.  Clicking that link – voila – my WordPress site migrated to run on Azure.  Theme was missing, that’s easily rectified, but the whole process (with all the research) took me about an hour.  Not too shabby thanks to all those wonderful internet denizens selflessly giving all their knowledge to people like me.