How to Install and Run WordPress on Microsoft Azure

This post is not just about installing and running WordPress on Microsoft’s cloud platform, Azure, but it is to show you the many ways you can. Each developer has their own style. Each client or customer has their own needs. If you are implementing WordPress you can choose the approach based on the needs for the project. We will look at simple one click deploys to full virtual machine environments.

Did you know there are actually six different approaches to configuring WordPress out on Azure? Web Apps, Scalable Web App, Virtual Machine, LAMP Virtual Machine, WordPress Virtual Machine, Web App + Virtual Machine!

I have a Channel 9 video or you can follow step by step below.

Web Apps

  1. Log in to the Azure Management Portal.
  2. Click New -> Web + Mobilenew-web-app
  3. Search for WordPress. Make sure you choose just WordPress. We will look at some of the others later on.wordpress-search
  4. Click Create to get to the installation and configuration of the Web App. 
  5. Enter a host name for the web app in the Web app box. This name will be the URL that you will use to access the website. {}. Depending upon your App Service plan, you can change that hostname to a custom domain name. Also, your hostname will have to be unique. You will see a red x if it is not.
  6. Select a Resource Group or create a new one. For more information about resource groups, see Using the Azure Portal to manage your Azure resources.
  7. Select an App Service plan/Location or create a new one. For more information about App Service plans, see Azure App Service plans overview
  8. Click Database. This is the configuration for the MySQL DB. You will need to provide a Database Name, keep the Database Type as Shared, choose a Location (should be the same location as your web app) and then a Pricing Tier.
    Something to note – the MySQL DB is hosted by a company called ClearDB. They have their own plans and pricing which is different from Azure. There is a free tier, however the size of the DB is very small. Be sure you review the pricing before you continue.
  9. Click OK.
  10. You will need to accept the legal terms from Clear DB and then click Create.
  11. In a mater of moments your site should be created. You will get a prompt in the portal when it is complete.
  12. You can navigate to your website and finish the WordPress installation.

A few things to note with the Web App. You can utilize a free tier with Azure. If you choose the Free plan and the Free ClearDB you will pay nothing. Also, be sure you look at all of the plans. Some allow custom domains, staging slots and more!


Scalable Web App

I am not going to go into too much detail with this one. This web app provides various sets of optimizations and plugins such as using Azure Storage for Media content, Jetpack etc. It was built to maximum performance of running WordPress on Azure Websites. You still need a MySQL DB hosted by ClearDB.

The steps for installing this is identical to the Web App, except you need to find Scalable WordPress when you search.


Also, there is an option that is required to configure an Azure Storage Account.

  1. Click on Storage Account configuration to either link a new or existing storage account to this resource group.
    Tip – I would first create a Storage Account and then link it to this web app.

    1. Search for Storage Account
    2. Then follow the configuration blade by entering a name for the account, pricing, resource group and location.
    3. Be sure you look at the pricing and the redundancy!
  2. The rest is the same as the Web App.
  3. When all complete, login on WordPress Admin and go to Plugins to make sure the Azure Storage Plugin is installed.
  4. Then look at Settings and Azure to make sure the Storage Name is added as well as the access key!

Super fast to get going and now you are ready for the traffic to hit your site!

Virtual Machine

I am not going to go into detail at all with this option. Basically you stand up a Linux VM and start install everything on it. I have a blog post that walks you though the steps. At the end you are left with a LAMP VM running WordPress. In order for it to scale make sure you choose the appropriate plan and if you want a bit of redundancy make sure you create an availability set.

LAMP Virtual Machine

You might say, wait a minute, isn’t that the same as what you just said above. YES! It is. However, the one above you do all the work to get everything installed. A LAMP stack VM is done for you.

There are Projects that MS Open Tech builds, HTML5 Labs that contributes to the Edge platform and VM Depot where a community managed repository of Linux and FreeBSD virtual machine images for easy deployment to Microsoft Azure reside.

You can search for a open source product or platform and most likely there is an image that is ready to go and deploy. Let’s use LAMP as an example.

  1. Click on New > Compute
  2. Search for LAMP and you will see a listing of results.
  3. Choose the result that best fits your need. (I usually choose a Bitnami LAMP with Ubuntu)
  4. Click on Create
  5. A blade will open up with all of you configuration options and configure as needed.
  6. The Azure portal will alert you when it is complete.
  7. Then you can SSH into via the dns name
  8. From there you still need to install WordPress. See my post on installing WordPress.

One thing to note, If you choose a VM with configured software you might need to read the README to find out usernames and passwords to certain products. Bitnami has a wiki that is pretty useful. They are pretty locked down with their VM’s so make sure you check that out to make sure you are able to access the resources.

WordPress Virtual Machine

You now are going to definitely say this is the same as above. Because it is. Instead of searching for LAMP you search for WordPress. You will get VM’s and containers with WordPress already installed.


Same steps as above and same tips re: preinstalled software. Make sure you find all of that out before you start.

Web App + Virtual Machine

We saw how to stand up a VM. We saw how to deploy a Web App. This version does both. You have MySQL running on the VM and the Web App running on your App Service.

There are a few different approaches.

  • Create a Linux VM with MySQL running on it.
  • Create a Linux VM with MySQL and Apache for the phpMyAdmin tools
  • Create a LAMP VM that is preconfigured
  • Use a MySQL container

In each of the cases, you really want MySQL running and accessible. Some tips.

  • Make sure that port 3306 is open in the endpoint configuration within the VM in Azure.
  • Make sure the local host adddress is not bound in the my.cnf for MySQL to accept incoming requests.
  • Make sure your DB user is either from any host or the web app host

Then from the Web App install side you will do things a bit differently. Instead of using one of Azures WordPress Web App, search for Empty PHP and install that. Same steps with configuration as above.

Once running you will notice the website is blank. We will need to do the following:

  • Click on continuous deployment
  • We then can choose how we will deploy WordPress. Local or Remote. It is up to you.
  • I will choose External and enter in the GitHub URL for WordPress ( and finish the install.
  • Make sure you add the Storage account and the Azure Storage plugin to take advantage of making your website scream.

View the full video on Channel 9

WordPress Your Way