Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

GZip enabled but not working?



5:14 am on Mar 29, 2013 (gmt 0)

5+ Year Member

I'm running a dedicated server and I have double checked to ensure that mod_deflate is enabled via Apache (which it is).

I've also gone in under cPanel > Site Optimization, and turned on compression.

The site is running WordPress with the W3 Total Cache Plugin and the GZip options enabled. Sure enough when I check the page response headers in Google Chrome's PageSpeed plugin there is no 'Content-Encoding: gzip' header. I've also ran the site though the GZip checker but it says compression is not enabled anyways.

I am not sure what's causing the compression not to work. It's enabled on the server which I have verified through my Linux System Administrators at Host. Any ideas?

[edited by: Ocean10000 at 5:30 am (utc) on Mar 29, 2013]
[edit reason] Removed links [/edit]


1:02 pm on Mar 29, 2013 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

have you set any output filters?

please post all the mod_deflate and compression-related mod_header directives from your .htaccess file.


6:35 pm on Mar 29, 2013 (gmt 0)

5+ Year Member

Oops, here is the content of my .htaccess file...

<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml


9:01 pm on Mar 29, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Before anything else: Dump ALL the "IfModule..." envelopes. Not their content, just the envelopes themselves. Those are boilerplate that comes with mass distributions. You are now on an individual server that either has or does not have the required modules.

Once you've dumped the envelopes you will have a clearer idea of what your overall structure is.

Besides, nesting "If" statements makes me nervous. The more complicated you get, the more room there is for unintended consequences. (See unrelated thread elsewhere about surprising discoveries involving the humble FilesMatch.)

Featured Threads

Hot Threads This Week

Hot Threads This Month