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) {
Bookmark & Share
Related Posts
- Speedup WordPress Page Loading Times With PHPSpeedy
- I Need Wordpress MySQL Help, And I’m Willing To Pay
- How To Fix WP-Cache And Spam Karma 2 (SK2) Issues
- Optimise Your CSS File
- Ultimate Wordpress Site Speed - Install WP-Cache2 AND APC At The Same Time
- Mine Is a Lot Bigger Than Yours
- How to Disable or Enable Error Reporting in Windows


Comment by Ajay on 3 January 2007:
Do you have it installed out here?
Comment by Ajay on 3 January 2007:
Do you have it installed out here like this?
Comment by taragana on 5 January 2007:
It is better, cpu wise, to enable it from Apache.
Comment by Everton on 5 January 2007:
I always want to look after my CPU - will do now. thanks.
Comment by Everton on 6 January 2007:
mod_deflate is a module specific to the Apache 2.0 series, so I can’t install it as it’s not compatible with cpanel yet
.