WinCache, or the Windows Cache Extension for PHP, is a PHP accelerator that is used to significantly increase the speed of PHP applications running on Windows Server IIS. Besides increasing the speed of PHP applications, WinCache decreases CPU usage making it a win win situation extension. I’ve described how to run PHP with WinCache on IIS in an earlier post.
This post is about WinCache’s advantages for WordPress on Windows Server IIS.
The PHP loading time and MySQL queries statistics in the footer of a WordPress site might show:
Stats: 31 queries in 0.914 seconds, running PHP version 7.0.4 & Wincache Stats: 34 queries in 0.381 seconds, running PHP version 7.0.4 & Wincache Stats: 31 queries in 0.162 seconds, running PHP version 7.0.4 & Wincache Stats: 31 queries in 0.149 seconds, running PHP version 7.0.4 & Wincache
Pretty well, but still 31 queries for a vanilla WordPress site with only a few plugins.
To effectively use WinCache, there is a drop-in plugin available: WinCache Object Cache Backend. You can drop the
object-cache.php file in your
wp-content/ folder, to utilize WinCache’s object cache mode, a persistent memory-based backend for the WordPress object cache.
Now the statistics show:
Stats: 12 queries in 0.149 seconds, running PHP version 7.0.4 & Wincache Stats: 12 queries in 0.125 seconds, running PHP version 7.0.4 & Wincache Stats: 12 queries in 0.124 seconds, running PHP version 7.0.4 & Wincache Stats: 12 queries in 0.126 seconds, running PHP version 7.0.4 & Wincache
WinCache’s object cache is where WordPress and WordPress plugins store the results of complex operations. On subsequent loads, the data can be fetched from the cache (memory), which will be much faster dan dynamically generating it on every page load. In this case, saving some 19 queries.
Note: this is an older post, moved from another blog of mine.
If you want to step in to help me cover the costs for running this website, that would be awesome. Just use this link to donate a cup of coffee ($5 USD for example). And please share the love and help others make use of this website. Thank you very much!
My name is Jan. I am not a hacker, coder, developer, programmer or guru. I am merely a system administrator, doing my daily thing at Vevida in the Netherlands. With over 15 years of experience, my specialties include Windows Server, IIS, Linux (CentOS, Debian), security, PHP, websites & optimization.
Benchmarking WordPress, simple load & speed testing with ApacheBench
Measure WordPress loading time and queries
Tips to speed up WordPress, serve gzip compressed static HTML files
How to optimize your WordPress hosting – 9+ practical tips
Optimize WordPress MySQL tables through Cron, behind the scenes
Minify WP-Super-Cache HTML cache files: WPSCMin a WP-Super-Cache plugin