Blog Post

Apps on Azure Blog
3 MIN READ

A lowered cost and more performant WordPress on Azure AppService

RadhikaB's avatar
RadhikaB
Icon for Microsoft rankMicrosoft
Oct 10, 2022

Whether you’re shuffling a couple thousand visitors a day through an eCommerce shopping experience or attracting thousands of visitors to your content per day, your digital experience must be available and load fast to engage and wow your audiences. Our cloud-based solutions give your sites high availability, speed, scalability, and security, so you can press ahead with confidence.

 

WordPress hosted on Azure App Service is a fully managed Azure PaaS offering with built-in infrastructure maintenance, security patching and scaling. It also supports virtual networks, and the ability to run in an isolated and dedicated App Service Environment. WordPress updates and patches, threat detection and blocking, and traffic encryption with free SSL certificates are part of what we offer to all of our customers.

 

There are several forms of WordPress running on Azure, however we recommend WordPress on Azure AppService  from the Azure Marketplace as your start point. Because these Marketplace offerings are optimized for Linux App Service, they are designed to be easy-to-install and come with up-to-date software packages, fine-tuned SKU sizes for both App Service & Azure MySQL DB and also with support from App Service team.

 

Architecture:

 

Below are the out of the box configurations enabled with Marketplace WordPress on App Service image that led to give improved Request per second & response times.

 

Co-locate WordPress site and database

When you create a WordPress site using our Marketplace templates, we automatically select the database in the same region as your Web App. 

 

Caching

 By default, the WordPress on AppServcie is configured to use Redis server cache using the W3 Total Cache plugin enabled with Page Cache, Object Cache & Database Cache.  You can use other plugins of similar category or upgrade the current W3TotalCache to enterprise version.

 

Azure CDN

The Azure WordPress site is powered with fully managed CDN (Microsoft CDN)  to handle the static file content is capable of moving thousands of hits per day through our system. You can scale out the platform to manage the traffic spikes. 

 

Permalink format

Believe it or not, Permalink format can impact WordPress page load time. By default, the offering is configured with Day & Name type. We recommend not changing this.

 

Image Compression:

When you upload images to your site, it will automatically optimize and compress them for you using Smush It plugin.

 

Out of the box PHP configurations:

WordPress runs on PHP Server and the way PHP server configured plays a vital role in site performance. So there have been multiple parameters set to optimal level catering to WordPress needs.

 

Below is the guideline on the hosting plans one can choose to setup WordPress on Linux AppService based on your production workloads.  You may achieve the site response times in < a second for end user persona.

 

No. of Users

Requests per second

App Svc Hosting Plan

No. of App Service Instances

100

120

Standard(P1v2)

1

500

625

Production(P1v3)

1

1000

1200

Production(P1v3)

2

5000

6100

Production(P1v3)

4

10000

12050

Production(P1v3)

4

20000

21000

Production(P1v3)

6

 

Start your WordPress website today at Create WordPress on App Service - Microsoft Azure. Please comment on this post and let us know what you think. You can also provide your reviews at Microsoft Azure Marketplace.

 

If you are running your site either on Windows AppService or some other hosting provider and interested to migrate your workloads to WordPress on Linux App Service; here are the steps that you can follow: wordpress-linux-appservice/wordpress_migration_linux_appservices.md at main · Azure/wordpress-linux-appservice (github.com)

 

We will continue to deliver on our promise of empowering every WordPress developer to achieve more. If you have ideas about how we can do this better, you could post your ideas on Post idea · Community (azure.com) or you could email us at wordpressonazure@microsoft.com to start a conversation.

Updated Oct 13, 2022
Version 6.0
  • Many thanks.

    A first question is, if all you wanted was a simple 10-page static text Wordpress web site, is it possible to use the Free service plan?

    Thanks.

  • Mark-Allen Perry - Free service plan works however the Free Plan do not support always-on or backup and restore, so you may consider B1 plan instead.

  • wesleyhey's avatar
    wesleyhey
    Copper Contributor

    these instructions dont work and costs are way to expensive.

    It says to have 2 avaerage wordpress sites that the costs are over $200 a month with no activity how can this be, what steps can you do to get a cheap wordpress on azure other than going with someone other than Microsoft which i am at that point

  • LukeEds's avatar
    LukeEds
    Copper Contributor

    wesleyhey , I am running a multi-site (5 sites) at a cost of $50/month. - The secret? Go to your Web App/Scale up, and change it to a B2, then, go to your DB server, go to the Compute+Storage location, and change it to your need. (Mine is Burstable 1-20 cores, 20gb storage. cost, $10/month) 

  • ADEL_GERGIOS's avatar
    ADEL_GERGIOS
    Copper Contributor
    Other Other Any additional feedback? (Optional) Any additional feedback? (Optional)
  • greggerca's avatar
    greggerca
    Copper Contributor

    LukeEds , I am having a similar cost issue. I have 3 sites in a multi-site Azure Linux Wordpress and it's $45/month (mostly MySQL traffic costs) with very little traffic. The cost estimates provided while setting this up are really inaccurate, or there's some simple fix... but even with CDN, caching, extending the TTL on all pages and caches etc. the database server is being queried way too much (no Comments are enabled, the sites are static).

     

    I am on a Basic B1 plan for the Web App, and for my dbserver I've set it to Burstable (1-20 vCores). I think moving to a B2 would increase the costs. And there's no way I see to reduce the MySQL queries... I was hoping caching would reduce the querying because the sites are static. But apparently not.

     

    My old Windows-based Azure Wordpress site was about $12/month for the same sites. Sure, it was slow, but these sites have near zero traffic. 

     

    I'm guessing I just need to flatten them to HTML static sites and host them some other way. 

  • CristianMarin's avatar
    CristianMarin
    Copper Contributor

    greggerca wesleyhey I suggest using a plugin like Query Monitor - it might give you some insight into what part of your website queries the database most. Perhaps it's an inefficient plugin, not optimized for query-based costs, that you could replace.

    Also might be worth checking where the requests to your website originate from and what resources are being queried, because SEO/bot crawlers might send requests that trigger many requests to the database for objects that might not always be cached.