Quantcast
Channel: web application – Techie Corner
Viewing all articles
Browse latest Browse all 2

WordPress WP-Cache with GZip Compression enable

$
0
0

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


Viewing all articles
Browse latest Browse all 2

Trending Articles