With the release of WordPress 2.5, there is no longer an option to enable GZIP compression. This option was axed for the reason that it’s better to enable compression on the server, rather than through WordPress. GZIP is basically a compression “tool” that compresses files before sending them to the browser, if the browser states that it can handle GZIP compression. All modern browsers support GZIP compression, and send the appropriate header to the server to tell it that it can handle compression.
However, there is another compression library that is generally preferred over GZIP, called ZLIB. It’s essentially the same as GZIP, and is initiated by the same gzip header that browsers send.
We’ll be using ZLIB to speed up your blog. We’re using ZLIB because using GZIP causing TinyMCE (in WordPress) to be double compressed, and to stop working properly, using ZLIB works around the issue. Also, since ZLIB is preferred, we might as well use it.
Before enabling ZLIB compression, you’ll want to check with your host to ensure that PHP has been compiled with ZLIB support. I can confirm that BlueFur has it enabled on most (if not all) of their servers.
Now that you’ve made sure that your host can support ZLIB compression, let’s actually enable it. First of all, open your blog’s root .htaccess file. Then, you’ll want to add the following line to the file, above the WordPress code (# BEGIN WordPress):
php_flag zlib.output_compression On
Save the file, and reupload it. You should now notice improved speed in the execution time of your blog. On my blog, page execution has, on average, been reduced by 50%. However, your results may vary.
It’s important to note that, if you’re currently using any other compression or caching systems, you cannot use this in conjunction with them; you’ll have to choose between them or ZLIB compression.
This compression method will also work on any fairly dynamic site, it’s not limited to blogs.