Title: GZIP Not enabled?
Last modified: March 11, 2019

---

# GZIP Not enabled?

 *  [DC_CCFC](https://wordpress.org/support/users/tgo_dc/)
 * (@tgo_dc)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/)
 * Hi there,
 * When I run a speed test on my site, it says GZIP is not enabled.
 * Can someone advise the best way to enable this? I have all the various settings
   enabled in WP Super Cache, and also have the .htaccess file updated as per the
   guidelines on the settings page.
 * Tested using:
    [https://tools.pingdom.com](https://tools.pingdom.com)
 * URL: [https://corkcityfc.ie/home/](https://corkcityfc.ie/home/)
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgzip-not-enabled-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Saša](https://wordpress.org/support/users/stodorovic/)
 * (@stodorovic)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11298651)
 * Compression and leverage browser caching for static files is related to server
   rules (static files are served directly from the server without including WordPress).
 * You need to add rules into _.htaccess_. An example is (it isn’t perfect, but 
   I think that it includes all file types):
 *     ```
       ########## Begin - Optimal default expiration time
       ## Note: this might cause problems and you might have to comment it out by
       ## placing a hash in front of this section's lines
       <IfModule mod_expires.c>
           # Enable expiration control
           ExpiresActive On
   
           # Enable ETag
           FileETag MTime Size
   
           # Define font file types
           AddType application/x-font-woff woff woff2
           AddType application/x-font-ttf ttf ttc
   
           # Define image file types
           AddType image/webp webp webp
   
           # Default expiration: 1 hour after request
           ExpiresDefault "now plus 1 hour"
   
           # CSS and JS expiration: 1 week after request
           ExpiresByType text/css "now plus 1 week"  
           ExpiresByType text/javascript "now plus 1 week"
           ExpiresByType text/x-javascript "now plus 1 week"
           ExpiresByType application/javascript "now plus 1 week"
           ExpiresByType application/x-javascript "now plus 1 week"
   
           # Font files expiration: 1 month after request
           ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
           ExpiresByType application/x-font-ttf "access plus 1 month"
           ExpiresByType application/x-font-opentype "access plus 1 month"
           ExpiresByType application/x-font-woff "access plus 1 month"
           ExpiresByType image/svg+xml "access plus 1 month"
   
           # Image files expiration: 1 month after request
           ExpiresByType image/bmp "now plus 1 month"
           ExpiresByType image/gif "now plus 1 month"
           ExpiresByType image/jpeg "now plus 1 month"
           ExpiresByType image/jp2 "now plus 1 month"
           ExpiresByType image/pipeg "now plus 1 month"
           ExpiresByType image/png "now plus 1 month" 
           ExpiresByType image/tiff "now plus 1 month"
           ExpiresByType image/webp "now plus 1 month"
           ExpiresByType image/vnd.microsoft.icon "now plus 1 month"
           ExpiresByType image/x-icon "now plus 1 month"
           ExpiresByType image/ico "now plus 1 month" 
           ExpiresByType image/icon "now plus 1 month"
           ExpiresByType text/ico "now plus 1 month"
           ExpiresByType application/ico "now plus 1 month"
           ExpiresByType image/vnd.wap.wbmp "now plus 1 month"
           ExpiresByType application/vnd.wap.wbxml "now plus 1 month"
           ExpiresByType application/smil "now plus 1 month"
   
           # Audio files expiration: 1 month after request
           ExpiresByType audio/basic "now plus 1 month"   
           ExpiresByType audio/mid "now plus 1 month"     
           ExpiresByType audio/midi "now plus 1 month" 
           ExpiresByType audio/mpeg "now plus 1 month"
           ExpiresByType audio/x-aiff "now plus 1 month"
           ExpiresByType audio/x-mpegurl "now plus 1 month"
           ExpiresByType audio/x-pn-realaudio "now plus 1 month"
           ExpiresByType audio/x-wav "now plus 1 month"
   
           # Movie files expiration: 1 month after request
           ExpiresByType application/x-shockwave-flash "now plus 1 month"
           ExpiresByType x-world/x-vrml "now plus 1 month"
           ExpiresByType video/x-msvideo "now plus 1 month"
           ExpiresByType video/mpeg "now plus 1 month"
           ExpiresByType video/mp4 "now plus 1 month" 
           ExpiresByType video/quicktime "now plus 1 month"
           ExpiresByType video/x-la-asf "now plus 1 month" 
           ExpiresByType video/x-ms-asf "now plus 1 month" 
   
           # Disable caching for scripts and other dynamic files
           <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
               ExpiresActive Off
           </FilesMatch>
   
       </IfModule>
       ########## End - Optimal expiration time
   
       ########## Begin - Automatic compression of resources
       # Compress text, html, javascript, css, xml
       # May kill access to your site for old versions of Internet Explorer
       # The server needs to be compiled with mod_deflate otherwise it will send HTTP 500 Error.
       # mod_deflate is not available on Apache 1.x series. Can only be used with Apache 2.x server.
       # AddOutputFilterByType is now deprecated by Apache. Use mod_filter in the future.
       <IfModule mod_deflate.c>
           AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript text/javascript
       </IfModule>
       ########## End - Automatic compression of resources
       ```
   
 * If you have installed nginx then you should find similar rules.
 *  Thread Starter [DC_CCFC](https://wordpress.org/support/users/tgo_dc/)
 * (@tgo_dc)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11298677)
 * Thanks!
 * I’ve added this now.
 * Hope it works! 🙂
 * Will test again in one hour.
 *  [Saša](https://wordpress.org/support/users/stodorovic/)
 * (@stodorovic)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11298723)
 * It seems that doesn’t work.
 *     ```
       $ curl -i -s -H 'Accept-Encoding: br,gzip,deflate' https://www.corkcityfc.ie/home/wp-includes/css/dist/block-library/style.min.css
       HTTP/1.1 200 OK
       Server: nginx
       Date: Mon, 11 Mar 2019 12:49:04 GMT
       Content-Type: text/css
       Content-Length: 25242
       Last-Modified: Fri, 08 Mar 2019 20:53:12 GMT
       Connection: keep-alive
       Cache-Control: max-age=3, must-revalidate
       Expires: Mon, 18 Mar 2019 12:49:04 GMT
       ETag: "5c82d638-629a"
       X-Powered-By: PleskLin
       Accept-Ranges: bytes
   
       .wp-block-audio figcaption
       ...
       ```
   
 * Headers show nginx and Plesk as server. I’m not sure is it reason. You could 
   see [https://support.plesk.com/hc/en-us/articles/213380049-How-to-enable-gzip-compression-in-nginx-on-a-Plesk-server](https://support.plesk.com/hc/en-us/articles/213380049-How-to-enable-gzip-compression-in-nginx-on-a-Plesk-server)
   or contact your host for more details.
 *  Thread Starter [DC_CCFC](https://wordpress.org/support/users/tgo_dc/)
 * (@tgo_dc)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11298759)
 * Okay, I’ve edited my nginx ad added the below to the additional directives section.
 * Will see how this goes! 🙂
 *     ```
       gzip on;
       gzip_disable &quot;MSIE [1-6]\\.(?!.*SV1)&quot;;
       gzip_proxied any;
       gzip_comp_level 5;
       gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml;
       gzip_vary on;
       ```
   
    -  This reply was modified 7 years, 3 months ago by [DC_CCFC](https://wordpress.org/support/users/tgo_dc/).
 *  Thread Starter [DC_CCFC](https://wordpress.org/support/users/tgo_dc/)
 * (@tgo_dc)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11299001)
 * Tested here, and it says GZIP is enabled at 85% compression:
    [https://www.giftofspeed.com/gzip-test/](https://www.giftofspeed.com/gzip-test/)
 * I think I’m good now? What do you think?
 *  [Saša](https://wordpress.org/support/users/stodorovic/)
 * (@stodorovic)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11299100)
 * It seems that works.
 *     ```
       $ curl -i -s -H 'Accept-Encoding: br,gzip,deflate' https://www.corkcityfc.ie/home/wp-includes/css/dist/block-library/style.css
       HTTP/1.1 200 OK
       Server: nginx
       Date: Mon, 11 Mar 2019 14:08:21 GMT
       Content-Type: text/css
       Last-Modified: Fri, 08 Mar 2019 20:53:12 GMT
       Transfer-Encoding: chunked
       Connection: keep-alive
       Vary: Accept-Encoding
       ETag: W/"5c82d638-79d7"
       X-Powered-By: PleskLin
       Content-Encoding: gzip
   
       ^_<8B>^H^@^@^@^@^@^@...
       ```
   
 * I didn’t test all files. Also you need to check that serving supercache files
   works correctly (without double gzip compression). I didn’t notice it, but you
   need to double check it (you will see message in browser, so you could easy notice
   it). Please try different browsers for URLs which are already cached.
 *  Thread Starter [DC_CCFC](https://wordpress.org/support/users/tgo_dc/)
 * (@tgo_dc)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11299116)
 * Thanks. I will leave it 2-3 hours and test a number of pages in different browsers.
 * Is it possible WP Super Cache makes setup easier for those using nginx instead
   of Apache?
 *  [Piani](https://wordpress.org/support/users/webbmasterpianise/)
 * (@webbmasterpianise)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11301983)
 * removed
 *  [Saša](https://wordpress.org/support/users/stodorovic/)
 * (@stodorovic)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11302535)
 * I’ve checked your website and it seems that compression works as should.
 * I can’t answer what we could improve related to nginx, but maybe we could try
   to write better instructions for setup. Also, it’s tricky because there should
   be a lot of testing. I’ll try to do something if I find enough spare time.
 *  Thread Starter [DC_CCFC](https://wordpress.org/support/users/tgo_dc/)
 * (@tgo_dc)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11302632)
 * Great, thanks
 * What site do you use to test for compression?
 * I have used Pingdom, but it’s giving incorrect info I believe.
 *  [Saša](https://wordpress.org/support/users/stodorovic/)
 * (@stodorovic)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11302764)
 * [GTmetrix](https://gtmetrix.com/) shows URLs where compression don’t work. It
   requires patience because you need to wait few minutes, but I think that shows
   more details than pingdom.
 * > Enable compression for the following resources to reduce their transfer size
   > by 49.3KiB (76% reduction).
    - Compressing [https://www.eventbrite.ie/static/widgets/eb_widgets.js](https://www.eventbrite.ie/static/widgets/eb_widgets.js)
      could save 45.3KiB (77% reduction).
    - Compressing [https://cdn.geni.us/snippet.min.js](https://cdn.geni.us/snippet.min.js)
      could save 3.9KiB (71% reduction).
    - Compressing [https://stripensrq.global.ssl.fastly.net/s/o](https://stripensrq.global.ssl.fastly.net/s/o)
      could save 53B (16% reduction).
 * Maybe you could try to replace these external files. I don’t know. I use [CNDJS](https://cdnjs.com/)
   to optimize loading scripts/styles (if they exist on cdnjs).
 *  Thread Starter [DC_CCFC](https://wordpress.org/support/users/tgo_dc/)
 * (@tgo_dc)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11302812)
 * Thanks! I removed the top two, they’re out-dated plugins I no longer use. Should
   help somewhat.

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

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

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 12 replies
 * 3 participants
 * Last reply from: [DC_CCFC](https://wordpress.org/support/users/tgo_dc/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/gzip-not-enabled-2/#post-11302812)
 * Status: not resolved