How to Enable Gzip Compression

Web Development & Design/ 26th Mar 2019/Jamie Hoyles

Optimising your website will not only provide a better visitor experience, it will also position you to rank well with Google, Bing, Yahoo and other search engines. One way to speed up websites is to enable gzip compression…

What is Gzip compression?

Gzip is a way of compressing files sent from your server to increase the speed to which they are transferred to the user’s web browser.

It can reduce page sizes by up to 70% and subsequently improve load times.

Different ways to activate Gzip compression

Depending on your Content Management System, and/or server type you will find there are various methods to enable Gzip compression…

WordPress and Gzip compression

Most popular caching plugins have the facility to enable the function via their settings. I use WP Fastest Cache and the option is available via the settings home page:

Gzip Compression

Enable compression via .htaccess

Typically when enabling Gzip via a WordPress plug-in it is done by adding content to your .htaccess file. If you do not use WordPress or prefer not to use a caching add-on, you can enable Gzip compression manually by adding the following to .htaccess:

Enabling compression on Apache webservers

If gzip fails using the instructions above, remove the code added to .htaccess and replace with:

How to enable compression on NGINX webservers

To enable compression in NGINX you will need to add the following code to your config file:

Gzip compression on LiteSpeed Web Servers

You can enable compression on LiteSpeed servers via the configuration menu under ‘tuning’. Simply navigate to ‘enable compression’ and make sure it is turned on.

Checking Gzip is enabled

A good tool to analyse on site performance is A previous blog post Improve Your GTmetrix Score in Under 30 Minutes gives insight on steps you can take to improve your score. Enter your website url, click ‘Analyse’ and once the report has run you will be notified whether Gzip has been enabled successfully:

Gzip Compression

Office Manager & Customer Account handler at Clook Internet. SEO Enthusiast & WordPress Web Developer in my spare time. Outside work I’m a supporter of Blackburn Rovers, like fast cars and watching fast bikes…

We have a very strong team here at Clook and we build on everyone's strengths and weaknesses, you have to be able to make a good brew too!

Chris James

Customer Login

Forgot Password? Cancel