Optimising IIS for php and WordPress

If you’re serving wordpress or other php based web applications from a windows server, then there’s a few simple things you can do to speed up your web page delivery no end..

My TTFB (“Time to first byte”) rates on my pages were high. I’d already optimised wordpress and phpbb, so knew it wasn’t that. I then found a really helpful Technet article that ended up with my pages loading increadibly fast. The article:

https://docs.microsoft.com/en-us/iis/application-frameworks/install-and-configure-php-on-iis/how-to-configure-and-optimize-the-microsoft-web-platform-for-php

In Summary:

1. Use the WindowsCache Extension for PHP

This made a hug difference. Follow the guide in the Microsoft article. The .dll took some finding, but you can get hold of them here. This the the official PHP site so don’t be put off by the directory browsing.

I wouldn’t bother with the command line updating in the “Configure FastCGI…” section. Just update the ApplicationHost.config file. You might also find other php installations in there to. I didn’t do much beyond this section, but it halved my TTFB times.

2. Configure Output Caching

I couldn’t believe the difference this made. Once a client machine had loaded a webpage once, it would load lightening fast on the second visit. Again, just follow the MS guide. I set this up through IIS manager and user “User-mode caching” with  a query sting of “*”

And that’s it! You might be surprised by the results.

 

Be the first to comment

Leave a Reply

Your email address will not be published.


*