What 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
[tags]wordpress, wordpress hack, wordpress plugin, wp cache, wp cache hack, web, software, web application, blogging tools, blogging[/tags]
When I enable the ob_start(’ob_gzhandler’) I get error with firefox “Invalid compression”. Any idea what is cause of the error… This is also teh same with Chrome…
thanks for the tips, before i cannot enable it event using admin priviledge
how to turnoff the gzip
[…] 一用上 WP-Cache å°±ä¸èƒ½ç”¨ Gzip 了, 这应该也是出于对æœåŠ¡å™¨çš„考虑. 但是如果我就是想è¦å¼€ Gzip æ¥çœæµé‡çš„è¯, 怎么办呢? 现在有办法了. 1. 下载最新版的 WP-Cache 2. 关掉 gzip 的选项 3. 编辑 wp-cache-phase1.php 文件: 在 foreach ($meta->headers as $header) { header($header); å‰é¢æ·»åŠ if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’); 4. 编辑 /wp-content/advanced-cache.php 文件: 在 foreach ($meta->headers as $header) { å‰é¢æ·»åŠ if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’); 大功告æˆ! P.S.: 我以å‰çš„ blog 一页有300多k, åŠ äº†ä¹‹åŽä¹Ÿå°±å‡ åk… Gooooooooooooooood.! ^_^ 翻译自: WordPress WP-Cache with GZip Compression enable […]
[…] – Ativar Compressão de HTTP “HTTP Compression” Usando o plugin wp-cache2 através do hack descrito aqui. […]
[…] http://www.techiecorner.com/25/wordpress-wp-cache-with-gzip-compression-enable/ […]
[…] soluciones son ésta y ésta, aunque parece que no siempre […]
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 😉
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
[…] 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. […]
[…] the official WP-Cache suggests to disable GZIP support, there are some hacks(1, 2) to enable it. That is quite […]
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?
[…] 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 […]
[…] 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: […]
[…] 翻译自: WordPress WP-Cache with GZip Compression enable […]
[…] http://www.techiecorner.com/25/wordpress-wp-cache-with-gzip-compression-enable/ Tags: wordpress, blog, cache, gzip(del.icio.us history) […]
[…] Ricardo Galli Granada’s WP-Cache, and adjusted it a bit to enable gzip compression using this […]
[…] 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. […]
[…] WordPress WP-Cache with GZip Compression enable – Techie Corner […]
Thanks, this is a great tool.
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
[…] Techie Corner […]
[…] 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.. […]