Wordpress WP-Cache with GZip Compression enable

September 11th, 2006 by chua

wordpress, wordpress plugin, wordpress blog systemWhat is WP-Cache?
WP-Cache is an extremely efficient WordPress page caching system to make your site much faster and responsive. It works by caching Worpress pages and storing them in a static file for serving future requests directly from the file rather than loading and compiling the whole PHP code and then building the page from the database. WP-Cache allows to serve hundred of times more pages per second, and to reduce the response time from several tenths of seconds to less than a millisecond. (From: WP-Cache homepage)

How to have WP-Cache with Gzip compression enable?
The default WP-Cache plugin do not support gzip compression. If you would like to turn on WP-Cache with gzip compression you need to do some hacking. Here are the steps:-

1st:
Download the latest version of WP-Cache

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

That’s it! and now your site should be fast enough!

Credit: Chris Stormer

Technorati Tags: , , , , , , , , ,

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Reddit
  • BlinkList
  • del.icio.us
  • Digg
  • Fark
  • IndianPad
StumbleUpon It!

Related Post

17 Responses to “Wordpress WP-Cache with GZip Compression enable”

  1. Halbwegs Firefox Ready » LazyChris - Daily Stupidity Says:

    [...] Beim WeatherIcon Plugin handelt es sich um die v3, welche noch im Beta-Status läuft, aber anscheinend keinerlei Probleme macht, kann man empfehlen, falls man solch eine Spielerei wirklich will. WP-Cache hatte mich dafür noch mehr genervt mit dem Hinweis auf 0 cached paged, dafür weiß ich nun vermutlich, woran es happert. Im Grunde funktioniert WP-Cache2 ohne Probleme, aber nach dem Einbau des "Weissen-Seiten"-Fixes und des gzip-Fixes scheint es so, als läd WP-Cache2 mutwillig keine Seiten aus dem Cache mehr (0 cached paged) - aber sortiert jene bereitwillig gerne in den Cache-Ordner. Es scheint, als fehle ein Timestamp..oder aber, es wird falsch vergeben oder ausgelesen - nur leider scheitert mein Wissen an diesem Punkt.. [...]

  2. Thanks WP-Cache!!! « Jayant Kumar Gandhi Says:

    [...] Techie Corner [...]

  3. Nick Georgakis Says:

    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

  4. Pakistaniat Says:

    Thanks, this is a great tool.

  5. WordPress Hack : WP-Cache with GZip at orioa Says:

    [...] Wordpress WP-Cache with GZip Compression enable - Techie Corner [...]

  6. Couple Addons and Geeky AJAX Rambling | theditrolios.com Says:

    [...] Added AJAX Comments and enabled caching for faster response times, as our host has been kind of slow of late. As a web software developer, I’m a bit in love with AJAX at the moment, so I couldn’t resist the temptation to add it to our site. [...]

  7. Zero tee tee zero » Maintenance Says:

    [...] Ricardo Galli Granada’s WP-Cache, and adjusted it a bit to enable gzip compression using this [...]

  8. Wordpress WP-Cache with GZip Compression enable - Techie Corner Says:

    [...] http://www.techiecorner.com/25/wordpress-wp-cache-with-gzip-compression-enable/ Tags: wordpress, blog, cache, gzip(del.icio.us history) [...]

  9. Ben Inside - i.am.Ben’s Blog » 不改动任何文件为全站PHP添加Gzip & 同时使用 WP-Cache 跟 Gzip Says:

    [...] 翻译自: Wordpress WP-Cache with GZip Compression enable [...]

  10. Jase Says » Blog Archive » Happy birthday to meeeeeeeeeee Says:

    [...] according toRussell: http://codex.wordpress.org/WordPress_FeaturesRussell: this pageJase: http://www.techiecorner.com/25/wordpress-wp-cache-with-gzip-compression-enable/Jase: shitzuJase: you going to show me the mockupRussell: yeahRussell: hold on a secondJase: [...]

  11. How I increased by blog's load speed by 50% using YSlow Says:

    [...] to backup everything in case it doesn’t work. Anyway, here’s the method I followed to update my wp-cache files. Remember, you should still keep gzip disabled in WordPress. Editing the wp-cache code makes the [...]

  12. videokeman Says:

    im having problems with wp-cache expiry time settings but recently i was notified by my hosting of cpu overloads. is it better to use wp’s built in cache?

  13. Optimize WordPress in another 3 steps by Refactor the Life Says:

    [...] the official WP-Cache suggests to disable GZIP support, there are some hacks(1, 2) to enable it. That is quite [...]

  14. 5 Ways To Increase The Loading Speed Of A WordPress Blog Says:

    [...] Enable GZip with WP-Cache - Most people know about #3, but what about gzip with WP-Cache. By default, you have to turn off gzip when you’re running WP-Cache. However, that doesn’t mean you can’t use it and you definitely should be since it reduces the size of all Javascript and CSS files.You can find out how to enable gzip with WP-Cache by reading more here. [...]

  15. Jason Says:

    I cant do
    4th:
    Edit: /wp-content/advanced-cache.php

    for some reason advanced-cache.php is showing up as a folder
    im running WP 2.2.3 & WP cache Version: 2.1.2

    I tried to disable, deactivate,no luck
    any idea’s

    Jason

  16. Heiko Somorowsky Says:

    Hi!

    Which files should be “hacked” in WP 2.3? Cache File only!?

    Thx
    Heiko

    P.S. You need the “send my a mail if someone write a feeback” Plugin ;)

  17. WP-Cache con gzip en Wordpress | adseok Says:

    [...] soluciones son ésta y ésta, aunque parece que no siempre [...]

Leave a Reply