Enable Gzip Compress on Wordpress with WP-Cache 2.x

WP-Cache is a page caching system plugin for Wordpress blog that cache Wordpress pages during the first load or after a page expired, and store each Wordpress page in a static HTML file which in turn used to serve future requests. This process of web server serving the HTML pages directly from the file rather than building the page again by loading and compiling the whole PHP code, and retrieving the necessary data from the database where there is any page request significantly reduces the resource needed to run a responsive and fast website. Meanwhile, Gzip compression is an option provided by Wordpress that allows web server to serve the articles in compressed format if request by supported web browser, reducing bandwidth used and improving performance.

If you install WP-Cache version 2.0 or 2.1, you will be requested to turn off or disable Gzip compression in Options -> Reading tab. Although WP-Cache2 is fast enough, however, you can still try to enable the Gzip compression to further speed up the web server, improve the overall performance of network and website, and save the network bandwidth, by using the following trick. The hack allows Gzip compression to be used with WP-Cache system, by making WP-Cache compress the page articles, instead of Wordpress.

To turn on Gzip compression of web page while using WP-Cache 2, simply edit the wp-cache-phase1.php which is located in the WP-Cache plug-in folder inside the Plugins directory with text editor such as vi:

Add the following line:

if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’);

Before this line:

foreach ($meta-»headers as $header) {

Note that you still should not turn on or enable the Gzip compress article in Wordpress. If you do so, WP-Cache will not work.

Source

One Response to “Enable Gzip Compress on Wordpress with WP-Cache 2.x”

  1. Web Hosting Coupon Codes
    September 20th, 2008 08:32
    1

    Thanks this code edit really increased my page load time

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.

New Articles

Incoming Search Terms for the Article

wordpress gzip - gzip wordpress - wordpress compression - wordpress compress - Enable gzip compression wordpress - gzip compression wordpress - compress wordpress - wordpress gzip compression - gzip wordpress plugin - gzip for wordpress - how to enable gzip compression wordpress - wordpress use gzip - word press gzip - wordpress how to enable gzip compression - enable gzip wordpress - wordpress enable gzip - gzip compression for wordpress - gzip problems wordpress - wp enable gzip compression - how to use gzip in wordpress - adding page compression wordpress - header wordpress gzip - how to use gzip with wordpress - how to gzip wordpress - best way to compress wordpress - compress html wordpress - compression wordpress - how to gzip a wordpress - how to enable gzip on my webserver - wordpress gzip on - wordpress gzip - a2hosting wordpress gzip - compress wordpress site - enabling gzip compression wordpress - gzip wordpress problems - gzip wordpress 2.0.x - gzip compression with php wordpress - wordpress gzip compress - wordpress how to gzip - wordpress gzip - enable gzip for fast loading - how to enable gzip compression in wordpress - how do i enable gzip compressions on wordpress blog - wordpress enable gzip compression - Enable gzip compression wordpress - gzip compression bitdefender problem page not loading - wordpress and gzip - gzip для Wordpress - how to gzip word press blog - how to compress a wordpress database -