Wordpress 2.5 Removes GZIP Option

May 18th, 2008  |  Published in Apache, Site Performance, Web Development  |  3 Comments

Wordpress 2.5 no longer provides an option to turn on gzip compression. According to Matt Freedman, the “option was axed for the reason that it’s better to enable compression on the server, rather than through WordPress.”

This is probably true because the option was turning on php compression instead of setting it in apache. However, it was still a surprise to realize my site was no longer being compressed.

To remedy the problem, I added the following to my .htaccess file in the root directory:


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

This is the code for Apache 2.0 as suggested by Ryan Williams. Similar code for Apache 1.3 can be found.

The main point is the if you used to rely on Wordpress 2.5’s gzip option, you’re going to need to find an alternate solution.

Responses

  1. Ryan Williams says:

    May 19th, 2008 at 11:35 am (#)

    Well, that was a trip, another Ryan Williams out here on the ‘ol ‘interwebs. Funny.

    Thanks for the tip too.

  2. Jason Grigsby says:

    May 19th, 2008 at 11:39 am (#)

    Lol. Yeah, I thought it was you at first as well. I almost wrote (no, not THAT Ryan Williams).

  3. Paspartink savo svetainę mažiausiai dvigubai! - Juozo Kaziukėno blogas says:

    May 29th, 2008 at 11:02 pm (#)

    […] PHP glaudinimas nėra pakankamai efektyvus todėl tinklaraščių savininkams naudinga perskaityti čia esančią […]

Leave a Response