I've had a blog on Azure for quite a while, and despite optimisation attempts, it's still pretty slow. The initial TTFB seems to be a significant time sink.

Time check

Azure setup

It's quite a small blog and relatively low traffic so sits on an Azure s1 instance with auto-scale on for CPU usage. Additionally I migrated the Db away from clear DB instead putting it on a linux vm on azure.

Looking through the logs

I'm getting this error very frequently:

[19-Feb-2015 17:26:51 UTC] PHP Fatal error:  Maximum execution time of 300 seconds exceeded in D:\home\site\wwwroot\wp-includes\class-http.php on line 1511

Checks run

I have created and tested:

  1. a simple html page
  2. a simple php page
  3. a simple php page with a db connection test

None of these experienced delays

How to resolve

Looking at this enterprise grade wordpress on azure article it mentions the removal of ARR however the link is broken and other articles I've found don't dumb it down or relate it to php/ wordpress enough for me to use them.

I've also seen an SO relating to GoDaddy who are my DNS provider can be responsible for slow performance but that seems to apply when they are hosts, not DNS owners.

How does a person reduce this wait time for Wordpress websites on Azure?

  • Just to be clear, by TTFB you mean time to first byte? – Tom J Nowell Feb 12 '15 at 17:46
  • Yeah - sorry, picked up the phrase from the linked SO answer, assumed people knew more than me and that it was the standard term! – Steph Locke Feb 12 '15 at 17:51
  • 1
    Do you get similar TTFB for a simple PHP file or a PHP file that only connects to your database (both without WordPress) ? – birgire Feb 16 '15 at 19:53
  • 1
    @birgire Will write a php page and deploy to test. – Steph Locke Feb 17 '15 at 9:48
  • 1
    Just wondering if the original poster managed to figure this out? I have WordPress on Azure Web Apps and started OK when just an empty install, but now gets really slow TTFB. – Mike Rouse May 11 '15 at 6:41

Whilst I appreciate it's not the solution anyone would want after they've chosen to host on an Azure Web App, I'm yet to find anyone with a solution to this problem and I've spent a long time looking. I also debugged every one of our plugins and our theme with a fine tooth comb and still could not find the cause. All I could be sure about was a vanilla install works fine, but somewhere in the course of development, plugins, themes, etc, something causes this.

In the end my solution was to move all of our WordPress sites into a dedicated Azure Virtual Machine and use IIS Host Headers to create a multi-tenant environment.

  • It's been like 6 months and some more digging seems to point the finger towards Jetpack. Not saying it's the culprit, but if anyone wants to pick this up a closer look there first would be my tip-off. – Mike Rouse Dec 28 '15 at 0:17
  • We have this performance problem on Azure Wordpess and we are not using Jetpack. We had wordpress multisite feature enabled. At first I tought that could be the reason but it seems this problem exists in single site setups as well. – rovsen Jun 20 '16 at 13:57
  • Are you using a caching plugin at all? I found that WP Super Cache was a problem for us - disabling it fixed the problem. – Mike Rouse Jun 21 '16 at 22:03
  • we have no any caching plugins installed. We have plugins like Instagram Feed, Master Slider Pro, Meta Box, Sidebar Generator, Contact Form 7, Dahz DF Shortcodes and custom theme named Loma. I really think ClearDb is the culprit here (btw ClearDb is not free). – rovsen Jun 22 '16 at 6:44
  • If you are able to disable all plugins and try loading a few pages it'll be a good test. If everything speeds up you know it's plugins. Then turn them on one by one and see which one slows everything down. NB: I have one client on ClearDB and one client using MySQL via a VM, both running WordPress - the problem happens in both environments. I suspect there isn't a single culprit, so if you can find out any more do post back or drop me a message. – Mike Rouse Jun 22 '16 at 18:17

If this only happens in the first request to the site after the site has been idle for 20 minutes or more the delay could be down to the fact that Azure/IIS will "spin down" sites with no traffic after 20 minutes. The next request into the site causes IIS to "spin up" the site again, but this takes some time.

There's a setting in Azure Websites called "Always On" ... turning this setting on should eliminate the issue.


You'll need to turn on "Always On" under your site's Application Settings:

Always on

Of course you'd have a PHP version set for your site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.