WordPress 2.5 Removes GZIP Option

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.

3 thoughts on “WordPress 2.5 Removes GZIP Option”

Comments are closed.