Title: Gzip
Last modified: February 13, 2018

---

# Gzip

 *  Resolved [mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/)
 * (@mtrthenetwork)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/)
 * GZip not working properly
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgzip-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/gzip-5/page/2/?output_format=md) [→](https://wordpress.org/support/topic/gzip-5/page/2/?output_format=md)

 *  [calumbrash](https://wordpress.org/support/users/calumbrash/)
 * (@calumbrash)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9971545)
 * Hi [@mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/),
 * In order for us to troubleshoot your issue further could you please provide a
   bit more information about your Gzip not working properly?
 * Cheers,
    Calum Brash
 *  Thread Starter [mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/)
 * (@mtrthenetwork)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9971819)
 * Gzip is not working properly:
 * – Your server may not have the “deflate” module enabled (mod_deflate for Apache,
   ngx_http_gzip_module for NGINX).
    – Contact your host. If deflate is enabled,
   ask why all .htaccess or nginx.conf compression rules are not being applied. 
   If re-checking and restarting does not resolve, please check with your host or
   open a support ticket with us.
 *  [calumbrash](https://wordpress.org/support/users/calumbrash/)
 * (@calumbrash)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9971871)
 * Hi [@mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/),
 * Thanks for the reply. I see that your server is Apache, have you checked that
   mod_deflate is enabled? If you don’t know how to check this please contact your
   hosting provider for these details.
 * Cheers,
    Calum Brash
 *  Thread Starter [mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/)
 * (@mtrthenetwork)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9971875)
 * <IfModule mod_deflate.c>
    <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>
 *  [calumbrash](https://wordpress.org/support/users/calumbrash/)
 * (@calumbrash)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9971904)
 * Is this the current code that’s in your .htaccess file?
    If so please remove 
   it and replace it with
 *     ```
       <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>
       ```
   
 * Then navigate to Hummingbird’s Gzip page and click the re-check status button.
    -  This reply was modified 8 years, 3 months ago by [calumbrash](https://wordpress.org/support/users/calumbrash/).
    -  This reply was modified 8 years, 3 months ago by [calumbrash](https://wordpress.org/support/users/calumbrash/).
 *  Thread Starter [mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/)
 * (@mtrthenetwork)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9971906)
 * Yes it is
 *  [calumbrash](https://wordpress.org/support/users/calumbrash/)
 * (@calumbrash)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9971924)
 * In order for me to help you can you please provide more detail in your replies.
   Did you try replacing the code with
 *     ```
       <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>
       ```
   
 *  Thread Starter [mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/)
 * (@mtrthenetwork)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9971927)
 * I’ll replace it with the code you provided.
 *  [calumbrash](https://wordpress.org/support/users/calumbrash/)
 * (@calumbrash)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9971932)
 * Thanks 🙂 let me know how it goes.
    -  This reply was modified 8 years, 3 months ago by [calumbrash](https://wordpress.org/support/users/calumbrash/).
 *  Thread Starter [mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/)
 * (@mtrthenetwork)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9973648)
 * I’m unable to change the code in the gzip compression window to replace this 
   code – I’m only able to copy the current code and not manipulate it. Could it
   be somewhere else? Any suggestion?
 *  [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9973662)
 * [@mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/),
 * You need to edit the .htaccess file via any FTP client and paste the code, posted
   above by [@calumbrash](https://wordpress.org/support/users/calumbrash/). The 
   only difference is in the first lines:
 *     ```
       <IfModule mod_deflate.c>
           <IfModule mod_setenvif.c>
       ```
   
 * compared to:
 *     ```
       <IfModule mod_deflate.c>
           SetOutputFilter DEFLATE
           <IfModule mod_setenvif.c>
       ```
   
 * Best regards,
    Anton
 *  Thread Starter [mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/)
 * (@mtrthenetwork)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9973717)
 * Thank you. I guess my other question is where would I find my original .htaccess
   file – this a new process for me – I lost my webmaster so I’m having a go with
   this.
 *  [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9973724)
 * Oh. It’s where the index.php file and wp-content, wp-includes folders are located.
   Should be the top most directory for your website.
 *  Thread Starter [mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/)
 * (@mtrthenetwork)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9973824)
 * I found it and updated the file. Fingers crossed**
 *  Thread Starter [mtrthenetwork](https://wordpress.org/support/users/mtrthenetwork/)
 * (@mtrthenetwork)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/gzip-5/#post-9973831)
 * I now have NGINX in GZip compression – it wasn’t there before – would I want 
   to change this as well like I did for .htaccess
 * # Enable Gzip compression
    gzip on;
 * # Compression level (1-9)
    gzip_comp_level 5;
 * # Don’t compress anything under 256 bytes
    gzip_min_length 256;
 * # Compress output of these MIME-types
    gzip_types application/atom+xml application/
   javascript application/json application/rss+xml 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/svg+xml image/x-icon
   image/vnd.microsoft.icon text/css text/plain text/javascript text/x-component;
 * # Disable gzip for bad browsers
    gzip_disable “MSIE [1-6]\.(?!.*SV1)”;

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/gzip-5/page/2/?output_format=md) [→](https://wordpress.org/support/topic/gzip-5/page/2/?output_format=md)

The topic ‘Gzip’ 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/)

## Tags

 * [gzip](https://wordpress.org/support/topic-tag/gzip/)

 * 17 replies
 * 4 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-5/page/2/#post-10204504)
 * Status: resolved