The code changes here have been incorporated into WP Super Cache. Simply install the latest version, no modifications necessary.
For users who have written comments or are logged in, WP Super Cache serves up the traditional WP-Cache cached pages instead of static pages (or rather, the web server doesn’t direct logged in users the static pages). In other words, anonymous visitors get the compressed or uncompressed Super Cache pages, but logged in users only get uncompressed pages served by WP-Cache. I merged in the code I posted previously to make WP-Cache properly gzip compress cached pages once per page, so that logged in users can enjoy gzipped pages too (stored on disk and served by WP-Cache, not recompressed for each request). Very interested in what Donncha thinks about this. Also included Reiner Saddey’s fix to prevent WP-Cache from changing the content type of feeds to “text/html”.
Downloads:
WP Super Cache gzip enhanced - modified files
WP Super Cache gzip enhanced - diffs
Credit: Nick Georgakis and Reiner Saddey
If you liked this post, please subscribe to my feed. Thanks for visiting!


Thanks for doing the leg work! I’m going to give it a shot now.
You’re welcome. Great to have a responsive plugin maintainer.
hi Tummmblr,
please explain how to install both versions of your plugin.
I wonder if I’d need to install wp cache phase 1/2 and then overwrite the Donncha’s file (after renaming them from .php.diff to .php) or I can directly install Donncha files only?
Thanks
mario: Thanks for your interest. You should actually just download and install Donncha’s latest version of WP Super Cache (v0.4 I believe), no modifications necessary. Donncha has already incorporated the changes mentioned here. I should have edited my post to say that, sorry.
By the way, for future reference, diff files are formatted to show the differences between two files. You can’t actually rename diff files to php files and execute them; you need to “merge” the changes.
Hi
I just installed yours wp-cache with gzip enable and its running fine on my 2.3.1 wordpress. Now I find out about super cache and got all confused.
The latest version of it (0.5.1) is a huge project meant to completely replace wp-cache. But I am not sure does it have gzip enabled or not? Did you try it and would you recommend it to use instead of your solution?
Hi vladimir,
I do indeed recommend replacing any version of WP Cache with WP Super Cache. My gzip code modifications have already been incorporated in WP Super Cache, so you can enjoy all the features of WP Cache, plus gzip compression for all parties, plus static pages, and more!
In short, WP Super Cache out of the box is superior to any modification of WP Cache I’m aware of.
I have indeed installed Super Cache and works perfectly so far. Thanks for the info!
Cheers
Glad to hear that, Vlad. Thanks for your comments.
Tummblr, this is awesome. Thanks!
You made it SO much easier than I thought it would be… I’d been modifying code, etc., following Nick Georgakis’s work.
In fact, I then got Reiner Saddley’s WP-Cache/gzip v.2.1 solution working, then found your pingback JUST as I was about to ask him about a v.2.1.2 WP-Cache/gzip mod… and so I got your version working.
THEN saw your post pointing to WP-SuperCache… and so have that working.
You’re fantastic: all of you! Great optimization work. And now so easy to implement.
I have a last question for you and it’s a big one. I’m not at all sure you can help me out.
I’m using WP-SuperCache successfully on my business site. On my personal blog, it’s an essential design element to be able to switch back and forth between two themes.
I use the WordPress theme switcher plugin which creates a wptheme cookie. Can your solution or any of the above solutions be used with caching and theme switcher?
Hi Christoph,
Thank you very much for your comment. I’m thrilled that my humble work is appreciated.
Unfortunately, I am not familiar with the Theme Switcher plugin. Just guessing off the top of my head, if your theme switcher relies only on JavaScript code, then it should work fine with WP-SuperCache out of the box. If PHP execution is required, you can probably edit the .htaccess file to redirect userrs with the wptheme cookie to the PHP file instead of the static cache.
You should be able to test simply by running WP-SuperCache, and visiting your site without being logged in as an admin or someone who has commented (delete all your cookies or use another browser/computer). Does theme switching work?