How To Enable Gzip Compression in WordPress

Managing WordPress sites are easy if you follow our guidelines. Today we will teach you “how to enable Gzip compression in WordPress sites” . Enabling Gzip will make your site faster than previous. Let’s see what Gzip is ,and how it works.

What is GZIP?

GZIP is a type of compression which will compress the HTML and CSS files, thus the file size will be reduced to fifty to seventy percent of the original file size. Most of the websites uses this GZIP compression as this will drastically reduce the page load time and make the loading faster.

Benefits of using GZIP Compression

  • Site will load fast
  • Load time will be reduced
  • Less bandwidth used
  • Benefits of having good SERP

How To Enable GZIP Compression in WordPress

How To Check GZIP Compression status of your site?

There are several websites and tools which will do the work for you. You can use the websites below which will tell you whether it is already enabled or not.

  1. Varvy Gzip Status check
  2. Check GZIP status

How To Enable GZIP Compression in WordPress

There are several methods on how to enable GZIP Compression in WordPress sites. You can follow any of them and enable GZIP in your WordPress sites.

Method 1 : Enable GZIP compression on WordPress sites via Htaccess

You can enable gzip compression via editing your .htaccess file. By adding these code , gzip compression will be enabled in your WordPress sites. You can edit the .htaccess from the Cpanel or FTP client and even from the WordPress dashboard. Note: Learn How To Edit .htaccess File Straight From WordPress Dashboard

<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.*

Method 2 : Enable GZIP Compression on WordPress via W3 Total Cache

W3 Total cache is a very popular caching plugin which comes with many features. One of the features allows you to enable GZIP compression in your WordPress site. It’s a very easy stuff but we recommend you to use it safely as allowing any other option by mistake may cause different behavior in your site.

You need to go to the Performance tab and then to Browser Cache . Then you will see something like below. Now “tick” the “Enable HTTP (gzip) compression“.

Enable Gzip Compression Via W3 Total Cache plugin

Enable Gzip Compression Via W3 Total Cache -2

3. How To Enable Gzip Compression with WordPress Plugin

If you don’t love to tweak the codes on htaccess or don’t have W3 Total caches Plugin installed then this is another easy way to enable Gzip compression. There are some WordPress plugins which can enable the Gzip compression in your site.

  • Search for WP HTTP Compression
  • Download and install it
  • Voila !!! You have successfully enabled the Gip compression. It works automatically. You don’t have to do any other stuffs. Just check it using the Gzip status check tools.

I hope that you have enjoyed the article. If you have any problems regarding this article, you are requested to comment in the comment section below. Happy blogging !!!


Afsar is a passionate and dedicated individual who is currently working on a WordPress news site. With extensive experience in content creation and digital media, Afsar is responsible for delivering engaging and informative articles to the site's audience. Utilizing the latest tools and technologies, Afsar is constantly striving to improve the user experience and drive traffic to the site. When not working, Afsar can be found reading the latest news and staying up to date on industry trends, always looking for ways to bring fresh and exciting content to the site.

Click Here to Leave a Comment Below 2 comments
15 Bulletproof Ways To Speed up WordPress Site - January 15, 2016

[…] very easy to enable the gzip compression in WordPress. We have written a detailed article on how to enable gzip compression in WordPress. If you don’t have time and just want to speed up your WordPress site right now you need to […]

احسان - October 1, 2017



Leave a Reply:

By continuing (scrolling) to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.