WordPress 2.5 is being released in less than three weeks. While it has a lot of exciting new features, it is also missing a feature that’s been part of WordPress for a while: the option to compress page content for browsers that support compression. Up to version 2.3.3 of WordPress, you could select this option in the admin menu under Options > Reading:

I’ve found that letting WordPress gzip pages significantly improves performance, typically slashing the size of the text to a fourth. For my home page, that’s a 30% reduction of total page size—including images, ads, etc. A 30% reduction in bandwidth is nothing to sniff at.
So I’ve written a little plugin to restore the gzip compression for WordPress blogs. It’s not necessary if you’re using WordPress 2.3.3 or earlier, but you can go ahead and install it for previous versions in anticipation of upgrading, as it won’t cause any conflicts.
Download
Filosofo GZIP Plugin 1.1 | May 3, 2008
If you have problems, questions, or suggestions, please leave a comment below or open a ticket in my support forum.
See some of the other WordPress plugins I’ve created.
Like this plugin? Is it worth a latte?
This month I have received $49.00 for my plugin coding work, which is about $0.01 per download.

7 Trackbacks/Pingbacks
[...] Setting >Reading中少了一个gzip,少了一个gzip可不得了,一下子就会多了百分之三十到四十的的带宽使用。不过我见到一个万恶的资本主意国家一个人写了一个gzip的plugin for 2.5 (这个小伙子挺帅的,有几个孩子。还是资本主意好,可以生几个孩子。),我有点很奇怪,为什么版本升级反而把这个功能给和谐掉了呢。不过这样的事情也是经常有的,就像某个程序,老版本本来没有漏洞,写到新版本反而哪个地方有漏洞了,用老版本的代码一点事情都没有。扯到网络安全上面了。 [...]
[...] WordPress no longer allows you the option to compress your pages using gzip. Apparently gzip created problems for some people, and there are better server-side ways of doing this. However, I thought it was a simple way to reduce bandwidth and improve page load times, so for those interested, I created a plugin that restores the gzip feature. [...]
[...] have mod_gzip installed so I had no choice but to do this in PHP. Fortunately I came across this plugin that re-enables gzipping of pages saving me bandwidth and my visitors downloading [...]
[...] Download do GZip Pages Plugin [...]
[...] WordPress 启用 gzip。虽然 WordPress 2.5 取消了 gzip,但是我们可以通过插件 GZIP Pages 来实现,插件下载地址:GZIP Pages [...]
[...] meinen WYSIWYG-Editor - und wurde sofort rausgeschmissen, Ersatz hab ich auch schon und zwar das Gzip-Output. Gelesen: 4 · heute: 4 · zuletzt: 4. May 2008 « [...]
[...] like others also want to turn gzip back on again in the latest version of Wordpress. I installed filosofo’s gzip plugin and voila, load times dropped back down to < 0.2 seconds on this blog’s home [...]
8 Comments
I still haven’t tried it but it’s certainly a good idea, though.
You may want to take a look at the two extra tweaks I put into my bb-Gzip plugin for bbPress to add the support for chunked output and setting the gzip compression level to 1 (to use as few cpu cycles as possible) to enhance your plugin. It’s very straightforward.
http://bbpress.org/plugins/topic/bb-gzip-webpage-compression
I looked into this a bit further, and it looks like both Apache 1.3 and 2.x have support for gzip out the box, although different methods are used for utilising it with each.
Seeing as the official WordPress reason for removing the gzip option was so it’s handled by Apache, which is theoretically faster than PHP having to do it, it’s probably preferable to do this. I also noticed that the total file size of WordPress’s pages is smaller when Apache gzip is used rather than the internal WordPress (PHP) gzip method.
A little Googling will find you Apache 1.3 instructions I’m sure. But for those using Apache 2.x like me, sticking this in a .htaccess in your site’s root should do the trick:
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/json application/x-httpd-php application/x-httpd-fastphp application/rss+xml application/atom_xml application/x-httpd-eruby
Header append Vary Accept-Encoding
If it doesn’t work, your host needs to install the deflate module (usually enabled by default). Ask them and they should be able to do it.
That will not only gzip your WordPress pages, but also the CSS, XML, and JavaScript files — none of which are gzipped when the old WordPress function is used.
You can add any MIME type to the collection above, but do bear in mind that you *don’t* want to be gzipping stuff like images, Flash files, etc, as they’re inherently already compressed; indeed, gzipping these will slow you down. I suggest just sticking to those above.
I decided to take WP 2.5 and the GZIP pages plugin for a whirl. The strangest thing happened– as I started to post a comment, my code tab disappeared and the features on the visual tabs are inactive. Needless to say, I ditched both 2.5 and the plugin and returned to the previous version.
this plugin works nice, but if anyone want also style.css compress can use this tips
http://lonewolf-online.net/computers/knowledgebase/php_reduce-wordpress-bandwidth-usage/
I’d really love to use this plugin as it speeds up delivery of my blog pages by over three times!… however, it also breaks tinyMCE.
Before 2.5 I never used the visual editor, but it’s much better in the new version of wordpress, so I’d really like to have gzipping enabled, but also have use of tinyMCE.
Could you look into this please? — Perhaps there’s a way for you to gzip delivery of the blog, but not wp-admin?
Cheers, and thanks for contributing plugins to the wordpress community.
Thanks for pointing that out Milorad. I’ve updated the plugin in version 1.1 to work with TinyMCE. This should solve scoop’s problem as well.
Many thanks! that has to be the fastest response to a problem report I’ve ever seen or heard of.
Nice work
See some of the other WordPress plugins I’ve created.
Like this plugin? Is it worth a latte?
This month I have received $49.00 for my plugin coding work, which is about $0.01 per download.
Post a Comment