08
Jul
Software.  | 

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 :)




  1. 1 Chris Stormer 7-9-2006

    Maybe I should add some graphics, this isn’t nearly as nice looking as I had hoped. ;)

  2. 2 Nick Georgakis 10-22-2006

    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!

  3. 3 Ajay D'Souza 10-29-2006

    Nice short tutorial Chris.

    Do you have BB and WP-Cache running here?

  4. 4 Chris Stormer 11-28-2006

    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.

  5. 5 Ajay 2-7-2007

    Hi,

    i’m just wondering about advanced-cache.php , isn’t the wp-content/ supposed to be just a symbolic link?

  6. 6 pufone 7-26-2007

    Hello!

    Does this solution involve compressing the cached file each time it’s accesed?

  7. 7 ivan 8-17-2007

    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…

  8. 8 Beta3 10-13-2007

    Step 5: Activate Gzip ;)

  1. 1 SigT Trackback on Aug 25th, 2006
  2. 2 Wordpress WP-Cache with GZip Compression enable - Techie Corner Pingback on Sep 11th, 2006
  3. 3 Thanks WP-Cache!!! « Jayant Kumar Gandhi Pingback on Oct 2nd, 2006
  4. 4 www.ngtech.gr » Modifying WP-Cache 2.0 to generate and cache gzipped output once and serve it multiple times Pingback on Oct 22nd, 2006
  5. 5 Eite Webs - Official Blog » Blog Archive » Save Bandwidth with gzip Compression Pingback on Mar 22nd, 2007
  6. 6 Save Bandwidth with gzip Compression » Ajay - On the Road called Life! Pingback on Mar 23rd, 2007
  7. 7 Playing With Wire » Yahoo!’s YSlow Helps You Optimize Your Site Pingback on Jul 28th, 2007
  8. 8 Scaling WordPress - I’m Mike Pingback on Aug 13th, 2007
  9. 9 Optimize WordPress in another 3 steps by Refactor the Life Pingback on Sep 21st, 2007
  10. 10 Gzip Compresssion Now Enabled Pingback on Oct 13th, 2007

Leave a Reply