One of the things you must do to make your WordPress website faster to is to enable WordPress Gzip compression. Essentially what this does is, is asks the server to compress all the files before sending them to the user. Since the files are smaller, they take much less time to get delivered to the user, resulting in an overall faster experience for your user. This is quite a high recommendation on Google PageSpeed Insights and is suggested on website optimization sites such as GTMetrix.

Let's take you through the whole process of checking whether WordPress GZip compression is enabled on your site. We'll then show you 3 ways of enabling or disabling it as necessary. 

1. Enable WordPress Gzip compression via .htaccess files

2. Enabling compression via a WordPress Gzip compression plugin

3. Enabling compression across your websites using your hosting CPanel.

Check whether your WordPress site already has GZip compression enabled

Before you actually go and do any changes, you probably want to check whether your site gzip compression is already enabled for your WordPress site. There are quite a few other sites which can check whether you have GZip compression enabled or HTTP Compression test. Run your site through the gzip compression test.

Check WordPress gzip compression enabled

If you already have GZip Compression enabled, you don't have to do anything. You'll get a nice results such as the below which shows you that your website. If not, read on.

 Joomla gzip compression enabled

How to Enable WordPress GZip Compression

It is very very simple to enable WordPress GZip compression, there are infact multiple ways to do this, so we'll show you a few and you can chose the one which you prefer or works best for you. Remember before making any drastic changes, it is recommended that you take a full WordPress backup.

1. Enable WordPress Gzip compression via .htaccess files

A simple way of enabling WordPress Gzip compression is by setting a few directives in your .htaccess file. We've already seen ways of optimizing site speed by leveraging browser caching via your .htaccess file, so if you're comfortable messing around with your .htaccess file, then this is the method for you. Add the following to your .htaccess file, via your hosting server's CPanel / File Manager

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddType x-font/otf .otf
AddType x-font/ttf .ttf
AddType x-font/eot .eot
AddType x-font/woff .woff
AddType image/x-icon .ico
AddType image/png .png

Once you've enabled the above, run your site through the compression test. Of course, if you want to disable the compression, you just drop the above lines from the htaccess file. If there are other files which you would like to compress, you'll need to add these files types too in a similar method to the above.

2. Enabling compression via a WordPress GZip compression plugin

Given that you're trying to make your website faster by enabling GZip compression, we've got great news for you.

There is one plugin WP Rocket - which not only enables compression, but does tens of more optimizations to make your website faster. Amongst a few things which it handles it will:

  • Enable GZIP compression (of course!)
  • Enable browser caching
  • Enable image optimization (to make the size of your images small and faster)
  • Enables lazy loading, such that images and other heavy images are only loaded when they are needed (on-demand)
  • Integrates with a CDN such that heavy resources can be served more efficiently
  • Removes any old, dead or unused plugins and tables
  • Enables file and database caching
  • and plenty of other optimizations

The plugin is not free, but it's very well worth the investment in reality, because a fast website is a great experience, not just for you, but most especially, for your visitors! Most of all, it's enabled literally in a few minutes and with a few clicks!

Visit WP Rocket to make your website faster today

Not interested in this? REad on, there are other ways to do this of course!

If you want to use a way which is possibly less technical you can use a WordPress Gzip compression plugin. Simply put, rather than having to change files with the risk of possibly breaking your site if you make a mistake, a plugin makes it much easier to enable Gzip compression. You can either run a Google search for wordpress compression plugin or else go for our favourite Gzip Ninja speed compression.

As with all WordPress plugins, this is a fairly straightforward procedure to install and activate the plugin. Once you've done that, your site should now have WordPress Gzip compression enabled

WordPress gzip compression plugin 

3. Enabling WordPress GZIP Page Compressions for all WordPress and other sites on your hosting server

Besides enabling GZip page compression at WordPress level, you can choose to do this at the server level - if available. This means that all websites hosted on your server would now be fully gzip enabled. 

Look for the "Optimize website" icon on your Cpanel and click on it.

Gzip compression server level - Optimize website icon in Cpanel

Once you are in the Optimize Website on CPanel, you can choose to "Compress All content". This asks your server to gzip compress the content before sending it to the visitor. Of course, if your WordPress site is hosted here, you can rest assured that your content is also WordPress gzip compressed.

Gzip compress all content

You can easily achieve incredible saving using WordPress gzip compression, as you can see we achieved up to 81% compression. This is a great way to make your WordPress website much faster.

Download the list of 101 WordPress tricks every blogger should know

101 WordPress tricks

Click here to Download Now

Featured On

Inc Magazine Logo  

Sitepoint logo  

CSS Tricks logo   

webdesignerdepot logo   WPMU DEV logo   

and many more!

Where are we hosted?

This site is proudly powered by FAST VPS InMotion Servers and given an insane speed thanks to MaxCDN!

Web Hosting MaxCDN - Speed up your website

Advertise on

CollectiveRay (formerly known as DART Creations) is interested in developing partnerships with mutual benefit. If you like the stuff we publish and would like to develop a relationship, we'd be happy to hear from you. Go on - drop us a line - we'd love to hear from you :-)

New! DIVI 3.1 WordPress Template + PageBuilder

You'll surely create a perfect website with Divi 3.1!

Get an exclusive 20% OFF for CollectiveRay visitors until

Divi 3


The Outstanding HungryJPEG Bundles

AWESOMENESS! Bundles of premium font + graphic packs at more than 96% OFF!  Get this bundle for just $29 - This month ONLY!

The Hungry JPEG Awesome font bundles


Disclosure: CollectiveRay is funded personally out of pure passion for helping people working with websites. We do however generate some income through recommendations of products. This means if you click on a link and purchase an item we link to, we will receive a small sum out of that sale.

who are we?

CollectiveRay is run by David Attard - working in and around the web design niche for more than 12 years, we provide actionable tips for people who work with and on websites. We also run - a website for drone hobbyists.

David attard

Follow us on Social

Follow us on Facebook   Follow us on Google+   Subscribe to our RSS Feed   Follow us on Twitter