0

I am trying to make Enable compression 100% for my website speed optimization but I can not get the result. I tried plugins: Autoptimize, w3 total cache, wp rocket, clean cache, and others. The web host is Bluehost.
Here is the website link: https://airytravel.com/
I am new here. Hope someone can help me.

0

I assume you want to enable gzip compression for your website but it cannot be done on the WordPress itself, first, it has to be supported by the server and then server configuration needs to be changed. If your hosting is on Apache (most likely it is) then you can add these lines into .htaccess file:

# BEGIN GZIP COMPRESSION
<IfModulemod_gzip.c>
mod_gzip_onYes
mod_gzip_dechunkYes
mod_gzip_item_includefile.(html?|txt|css|js|php|pl)$
mod_gzip_item_includehandler^cgi-script$
mod_gzip_item_includemime^text/.*
mod_gzip_item_includemime^application/x-javascript.*
mod_gzip_item_excludemime^image/.*
mod_gzip_item_excluderspheader^Content-Encoding:.*gzip.*
</IfModule>
# END GZIP COMPRESSION

If your hosting uses NGINX then you have to modify nginx.conf file and put this code:

gzipon;
gzip_comp_level2;
gzip_http_version1.0;
gzip_proxied any;
gzip_min_length1100;
gzip_buffers168k;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_disable"MSIE [1-6].(?!.*SV1)";
gzip_varyon;
6
  • It's not working. Nov 20 '19 at 13:33
  • How did you test it? I just checked and it seems like content is compressed snipboard.io/TKq0Bm.jpg Nov 20 '19 at 19:06
  • I have tested on Gmetrix but the Enable compression is still 0. Nov 21 '19 at 2:38
  • I am approving your answer. but the GTmetrix test is still 0. Nov 21 '19 at 2:58
  • Hi, I have just checked and the compression you're talking about cannot be enabled for these files as they are being loaded from other domains, not your website. Check the details: new-widget.kiwitaxi.com/static/js/vendor.js, hopayacht.com/dist/css/bootstrap.css and many others come from other websites, not your website so compression needs to be enabled on them. Also you may copy them to your server and edit the website code to load it from your site. But in your website compression is working now :) Nov 21 '19 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.