How To Enable Gzip With WP-Cache2


I’ve made one last tweak to my site to improve performance that I’d like to highlight to other Wordpress users who use the WP-Cache2 plugin. WP-Cache2 unfortunately doesn’t work with gzip compression, which means that some of your pages might actually load slower than if you just used gzip.

Mark J as usual has provided a fix for WP-cache2 to make it it work with gzip compression, which makes WP-cache2 do the gzipping, not Wordpress.

To turn on gzip with WP-Cache2 (do not turn gzip on in Wordpress – let WP-Cache2 do the work, otherwise WP-Cache2 will disable itself) put the following line:

if ( extension_loaded('zlib') ) ob_start('ob_gzhandler');

above this line in wp-cache-phase1.php which is found in the WP-cache plugin folder:

foreach ($meta-»headers as $header) {


Read Related Posts




Latest Posts

Filed Under: Tools & Tips

Tags:

About the Author: Everton is based in London and has worked in the internet and mobile space for over ten years now, and before that worked in corporate strategy and consulting. He has a degree in Economics from Cambridge University.He also writes for Windows 7 News, Windows 8 News and One Tip A Day.

    blog comments powered by Disqus