Create WordPress on Azure App Service

Reading Time: 7 minutes


In this post I will explore creating a WordPress website on Azure App Services. Microsoft have made the deployment of WordPress on Azure App Services easier and have lowered prices compared to previously.

The default Operating System (OS) for the WordPress installation will be Linux. When it comes to WordPress hosting, Linux is the preferred OS by developers so Microsoft have set the default OS to Linux. The Operating System can be set to Windows if needed. Furthermore, Microsoft will support this service in the event you require support.

What is WordPress?
WordPress started in 2003 by two individuals named Mike Little and Matt Mullenweg. Today, WordPress is built on PHP and MySQL, and licensed under the GPLv2. It is also the platform of choice for over 43% of all sites across the web. This blog you’re accessing right now, cloudbuild.co.uk, runs on WordPress.

The WordPress open source project has since evolved and has become one of the most popular solutions to allow people to deploy websites. People with a limited tech experience can use it out of the box, and more tech-savvy folks can customise it in remarkable ways. WordPress is designed for everyone.

WordPress is a versatile and popular content management system that’s used to create websites of all sizes, for multiple purposes. From small personal blogs to large-scale corporate sites and e-commerce stores, WordPress offers a range of functionalities and customisations to suit different needs. Because of its overwhelming popularity, WordPress is a target for hackers. Websites that run on the platform can be vulnerable to security threats such as malware and phishing attacks. Click on the following link for tips on how to secure your WordPress site, WordPress on Azure – Security.

WordPress on Azure
The purpose of this post is to deploy a WordPress site on Azure App Services. Let’s get started.

  1. Login to portal.azure.com

  2. Search and click WordPress on app service


2. Select a subscription and use an existing or a new Resource group.


3. Specify a region and give your WordPress site a new name.
Depending on the plan you select in step 4 below, you’ll be able to add a custom domain later if needed.


4. Select a Hosting plan, I’ll be selecting the basic for hobby or research purposes.


5. Select your Site language and add an admin email address

Note: The admin email address is important. This is where you’ll receive update notifications and the recovery email address in the event you need to reset your password.


6. Next, select a login name for your WordPress Site.


Note: avoid using the username admin, it’s a common default username used for WordPress sites worldwide, and what hackers use when attempting to brute force attack your website with the aim of accessing your WordPress backend.

7. Click Next: Addons


8. I have unchecked options, Azure Email Service as this is a demo site and won’t be used to send bulk marketing emails. I won’t be using a CDN (Content Delivery Networking) for caching and performance. Finally, I won’t require a Azure Front Door Load Balancer.

Benefits of Azure CDN (Content Delivery Network)

Microsoft highly recommend that you opt for CDN while creating your WordPress on Azure App Service instance. Why?

  1. Higher Performance: Azure CDN helps in achieving higher performance by delivering content to users faster and by decreasing load on the server.
  2. Higher availability and scalability: Azure CDN improves availability and scalability by replicating content across a large number of servers around the world.
  3. Higher security: Azure CDN provides additional security through features like customised domain HTTPS and DDoS mitigation.

Due to this being a personal/demo site, I have no reason to enable CDN.


9. Scroll down to Azure Blob Storage.

I’ll enable the option to use an Azure Storage account to store website images and videos. This will become the default storage for when I upload images/videos to my WordPress site.

The wizard will also create a new Azure Virtual network to logically isolate services (Website and backend DB) into their own subnets.

Private DNS zone integration is required to connect to your Flexible MySQL Server in the Virtual Network using server name (fully qualified domain name). A new private DNS zone will be created or you can optionally choose an existing one linked to the selected Virtual Network.

Note: If you do not prefer the system generated default storage account and VNET names, create your Storage Account and Virtual Network prior to going through the wizard and use the drop down to select your options.


10. When ready, click Next: Deployment


11. Deployment slots are disabled if you selected the basic plan.

A staging site allows you to safely test your changes before deploying them to the production environment. It reduces the risk of breaking your live site or causing disruptions.

If you require deployment slots, you’ll require the standard or higher plan.


12. Click review+create and check the summary before clicking the Create button


The deployment process may take up to 15 minutes whilst the system creates your App Service Plan, App Service (WordPress Site), MySQL database, Private DNS Zone, Storage Account and Virtual Network configuration.

Possible deployment errors:

Error 1: Public access is not permitted on this storage account.

Azure now disable the option Allow Blob anonymous access on newly created Storage Accounts. We’ll be storing publicly accessible images to our WordPress site, this option needs to be enabled. Please ensure you do not store sensitive data in your Azure Storage blob container.

Access your newly created Storage account, click configuration from the left pane and enable Allow blob anonymous access


13. After the deployment succeeds, you can visit your WordPress site using the unique website name you specified earlier *.azurewebsites.net. This will trigger the installation of your WordPress site.


14. Once deployed you can continue to login to the backend WP Admin page by adding wp-admin to the end of the url, such as, yourwebsite.azurewebsites.net/wp-admin

Use the admin username and password you set in step 6 above.


Issue: New WordPress site displays a blank page.

Resolution: Login to the sites admin panel as per step 14 above. From the left pane, click settings, click permalinks and without making any configuration changes, click the save changes button. I usually set my permalink structure to post name, however this is not a requirement to resolve this issue. Clicking the save button without making any changes is sufficient. Try accessing the website again.

15. To avoid a brute force attack, I personally install a free limit login plugin which locks out anyone who attempts an incorrect username and password a few times in a row. The lockout is configurable. It works great for personal websites.


16. To install the limit login plugin, from the left pane, click Plugins and Add New Plugin


17. Search for Limit login


18. Select a plugin. I’ll be selecting Limit Login Attempts Reloaded. Click Install and then Activate.


19. Once installed, click Limit Login Attempts from the left pane, click Settings and scroll down to Local App to view the lock out policy. Amend the policy if needed.


20. I also change the publisher display name which appears on posts. For example, if you were to publish a new post, it would display published by username. Username being the login username to the website.

To change the display name, click Users and then All users from the left pane. Click your user, scroll down and in the first name field type a name different to your username. Then use the drop down (Display name publicly as) and select the new name. Click save.

21. Finally, because we selected to use Azure Storage Blob to store and publish images on the WordPress site, when you upload an image to a post it will automatically be stored in the Azure Storage Account you specified earlier.

I have uploaded the Azure logo to a post as shown in the image below.


If I right click the image and click copy image link, the image is being published from my storage account.


and that’s it. You can continue to develop your WordPress site as per your requirements.

I hope you found this post useful. See you at the next one.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.