Title: GZIP Not Functioning
Last modified: March 14, 2018

---

# GZIP Not Functioning

 *  Resolved [Robbie Gee](https://wordpress.org/support/users/robbie-gee/)
 * (@robbie-gee)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gzip-not-functioning/)
 * I’ve received this error:
 * ## DEFLATE ##
    <IfModule mod_headers.c> <FilesMatch “\.(js|css|xml|gz)$”> Header
   append Vary: Accept-Encoding </FilesMatch> </IfModule> <IfModule mod_deflate.
   c> #The following line is enough for .js and .css AddOutputFilter DEFLATE js 
   css
 *  #The following line also enables compression by file content type, for the following
   list of Content-Type:s
    AddOutputFilterByType DEFLATE text/html text/plain text/
   xml application/xml
 *  #The following lines are to avoid bugs with some browsers
    BrowserMatch ^Mozilla/
   4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE!
   no-gzip !gzip-only-text/html </IfModule>
 * ## GZIP ##
    <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include
   file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include
   mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude
   mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule
   >
 * ## EXPIRES CACHING ##
    <IfModule mod_expires.c> ExpiresActive On ExpiresByType
   image/jpg “access 1 year” ExpiresByType image/jpeg “access 1 year” ExpiresByType
   image/gif “access 1 year” ExpiresByType image/png “access 1 year” ExpiresByType
   text/css “access 1 month” ExpiresByType text/html “access 1 month” ExpiresByType
   application/pdf “access 1 month” ExpiresByType text/x-javascript “access 1 month”
   ExpiresByType application/x-shockwave-flash “access 1 month” ExpiresByType image/
   x-icon “access 1 year” ExpiresDefault “access 1 month” </IfModule>
 * Please advise as to which GZIP you are using.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/gzip-not-functioning/#post-10073030)
 * Hi [@robbie-gee](https://wordpress.org/support/users/robbie-gee/),
 * This is the code that Hummingbird is using to enable gzip compression:
 *     ```
       <IfModule mod_deflate.c>
       	SetOutputFilter DEFLATE
           <IfModule mod_setenvif.c>
               <IfModule mod_headers.c>
                   SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
                   RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
               </IfModule>
           </IfModule>
           <IfModule mod_filter.c>
               AddOutputFilterByType DEFLATE "application/atom+xml" \
                                             "application/javascript" \
                                             "application/json" \
                                             "application/ld+json" \
                                             "application/manifest+json" \
                                             "application/rdf+xml" \
                                             "application/rss+xml" \
                                             "application/schema+json" \
                                             "application/vnd.geo+json" \
                                             "application/vnd.ms-fontobject" \
                                             "application/x-font-ttf" \
                                             "application/x-font-opentype" \
                                             "application/x-font-truetype" \
                                             "application/x-javascript" \
                                             "application/x-web-app-manifest+json" \
                                             "application/xhtml+xml" \
                                             "application/xml" \
                                             "font/eot" \
                                             "font/opentype" \
                                             "font/otf" \
                                             "image/bmp" \
                                             "image/svg+xml" \
                                             "image/vnd.microsoft.icon" \
                                             "image/x-icon" \
                                             "text/cache-manifest" \
                                             "text/css" \
                                             "text/html" \
                                             "text/javascript" \
                                             "text/plain" \
                                             "text/vcard" \
                                             "text/vnd.rim.location.xloc" \
                                             "text/vtt" \
                                             "text/x-component" \
                                             "text/x-cross-domain-policy" \
                                             "text/xml"
   
           </IfModule>
           <IfModule mod_mime.c>
               AddEncoding gzip              svgz
           </IfModule>
       </IfModule>
       ```
   
 *  Plugin Support [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * (@wpmudev-support6)
 * [8 years ago](https://wordpress.org/support/topic/gzip-not-functioning/#post-10204521)
 * Thanks for using our plugin. As there’s no reply for a long time here, I’m marking
   this thread as resolved. Feel free to comment back here though, if more assistance
   is needed and we can re-open it for you! 🙂
 * Warm regards,
    Dimitris

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘GZIP Not Functioning’ is closed to new replies.

 * ![](https://ps.w.org/hummingbird-performance/assets/icon-256x256.gif?rev=2633221)
 * [Hummingbird Performance - Cache & Page Speed Optimization for Core Web Vitals | Critical CSS | Minify CSS | Defer CSS Javascript | CDN](https://wordpress.org/plugins/hummingbird-performance/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hummingbird-performance/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hummingbird-performance/)
 * [Active Topics](https://wordpress.org/support/plugin/hummingbird-performance/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hummingbird-performance/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hummingbird-performance/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/gzip-not-functioning/#post-10204521)
 * Status: resolved