So while installing some nice spam protection, I came across some interesting conflicts between.
1. Bad Behavior (The spam filter plugin)
2. WP-Cache (The Speed the site up plugin)
3. GZIP (The zip the page and server it to you faster feature built into Wordpress).
Basically wp-cache doesn’t work with gzip and bad behavior doesn’t work with wp-cache.. how to fix this?
1st: Go out and download the newest versions of both wp-cache 2 & Bad Behavior
2nd: Turn off gzip in the options.
3rd: Edit: wp-cache-phase1.php
Add This line:
if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’);
Before this:
foreach ($meta->headers as $header) {
header($header);
4th: Edit: /wp-content/advanced-cache.php
Add:
if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’);
Before this:
foreach ($meta->headers as $header) {
Now everything shouldu play together nice. Your site should BLAZE and be protected.
Enjoy :)



Maybe I should add some graphics, this isn’t nearly as nice looking as I had hoped. ;)
Hello Chris, You might be interested checking out an enhanced way of adding gzip support to wp-cache , which caches the gzip output , avoiding to compress it again every time a client requests it.
You can find it
here
If you could try it / verify it works that would be great!
Nice short tutorial Chris.
Do you have BB and WP-Cache running here?
Ajay,
Actually I turned off BB mostly because I was catching most of the spam with other menthods and I’m always trying to eek out every ounce of speed I can snag.
Hi,
i’m just wondering about advanced-cache.php , isn’t the wp-content/ supposed to be just a symbolic link?
Hello!
Does this solution involve compressing the cached file each time it’s accesed?
content is compressed each time, but many tests show that this actually works faster since there’s less output to send out, than with uncompressed content, thus pages are served faster
ps. Chris, this page is all broken in my firefox ? Sidebar is covering the part of the content…
Step 5: Activate Gzip ;)