WinCache, or 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.
This post is about WinCache’s advantages for WordPress on Windows Server IIS. I’ve described how to run PHP with WinCache on IIS in an earlier post.
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 let’s see the statistics below:
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.
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, WordPress, websites & optimization. Want to support me and donate? Use this link: https://paypal.me/jreilink.
Reduce Wordfence CPU usage, disable Wordfence “Live Traffic View”
Automatically flush Redis cache after publishing a WordPress post
WordPress .htaccess security best practices in Apache 2.4.6+
Set WP_MEMORY_LIMIT value correctly in wp-config.php