Move to WordPress in Azure

I don’t know really why I haven’t moved my hosted WordPress blog to Azure yet. But, now is the time.

I am surprised how easy it was. A couple of clicks and you are done.

First, login to your Azure portal and go to the marketplace.

Select and create a WordPress app.

Create WordPress app in Azure

Fill in the mandatory fields for creating an app. I choose to have a MySQL In App (Preview) Database Provider.

Select Database Provider

Once created, go to your current WordPress installation. Login as admin, go to Tools, Export and chose All content. Then click Download Export File. You’ll now get an XML file with your site content.

Export posts and content from WordPress

Go back to Azure and open your newly created site. Fill in a Name, Username, and Password. Login as admin, go to Tools, Import. Select the newly created XML file and click Upload file and import.

Import posts and content to your new WordPress app

Voila, all your blog posts and other content is moved. But, you still have to move all your media files. Go back to your old installation of WordPress. As admin, go to Tools, Export. Select Media and choose a Start date and an End date to export all the media created during that time period. Click Download Export File.

Go back to your new WordPress installation in Azure. As admin, go to Tools, Import. Select the file and click Upload file and import. Done, you now have all your media files.

There are two things left to do.

You have to do something about the themes and plugins in your new installation. I’ve always used a defualt theme with minor modifications so I don’t have to move them from the old installation to the new. If you have quite a lot of modifications you should look into some plugin that helps you clone or move your old installation. You also have to install your plugins that you’ve installed on the old installation. Again, since I only use Aksimet for spam protection, I only have to copy my API key.

Secondly you have to point your URL to your new location. In Azure you navigate to your app, click Custom Domains. Copy the IP adress that is shown. Click Add hostname.

Add Custom Domain to your WordPress app

Now you have to verify that you own the domain that you want to redirect to your Azure app. You do this by going to your current registrar and configure the DNS settings there. You should create two CNAME settings as seen in the figure below.

Configure DNS settings

Once that is done, go back to Azure, fill in Hostname and click Validate. If configured correctly, you should get two green OK and can then click Add hostname. If you get any error, follow the links under CNAME configuration in Azure.

Add hostname

Now your’e done. It can take a while for the DNS settings to propagate so you might not be able to use your URL to reach the new WordPress installation in Azure for a while. But give it a try after an hour or two and you should see that it works.

Enjoy.