Enable Gzip Compression In cPanel in just 2 minutes.
You may surprise reading this but I am pretty sure that If you read this post which is particularly on how to enable gzip compression in cpanel.
But, before coming onto the main content let’s discuss the term following terms Gzip Compression, Apache mod_deflate, mod_deflate .htaccess.
These terms help you to understand the mechanism of compressing the content and its advantage.
Let’s dive into the compression pool…
What is gzip compression?
Gzip is short for GNU Zip and used to compress the original data or HTTP data on the server-side before serving to the client. This tool works on the principle of a lossless compression algorithm.
Using Gzip compression on the server results in increasing the page load time by compressing the original web data or file by up to 80 percent.
That is the only reason why everyone wanted to enable gzip compression. Enabling gzip compression on the server-side decreases page load time, bandwidth consumption, and also helps to reduced SSL overhead.
Let’s see how to enable gzip compression command on the different software as well as on the server.
How to enable gzip compression in cPanel?
If you have the access to cPanel you can enable this feature on the website easily in just a few steps and this step doesn’t require any specific tech knowledge or codes to get started with this step.
Note – apache mod_deflate should be successfully installed or enabled on your server then only you are able to correctly configure the gzip compression in Cpanel.
Assuming that apache mod_deflate is enabled on the server now jump to the final steps.
Step 1 – Login to your cPanel account.
You can login to your cpanel account trough any method genrally that you prefer.
Step 2 – Find Optimize Website
After successful logging to the cpanel account, scroll down to the software section.
In this section, you will find much different software that is useful in their own ways but we need to find the Optimize Website software as shown in the picture below.
Once you find the Optimize Website. Click on it and follow the next step.
Step 3 – Select the appropriate option
A new page will open with having three different options as shown in the picture below. Now here you need to select the appropriate one.
The first is Disabled, this is the default selected option which means the compression is disabled on your server.
Second one has Compress All Content.
Third option is Compress the specifies MIME types.
You need to select the second option that is Compress All Content. Once you selected the options click on Update Settings.
And you are done. Enjoy you have succesfully enable gzip compression in cpanel.
The WHM administrators can enable gzip compression option globally for all the Cpanel accounts using their control panel.
Now, those who haven’t accessed both WHM and cPanel can enable Gzip compression using the command line.
WordPress – Enable Gzip Compression
The WordPress user can enable this feature by using a cache plugin that supports gzip compression. Also, they can enable this feature by enabling it on the webserver using the .htaccess file.
Here are the top 5 wordpress plugins to enable gzip compression:
- Enable Gzip Compression
- WP Rocket
- WP Super Cache
- W3 Total Cache
- Page Speed Ninja
Enable Gzip Compression on Apache
To enable gzip compression on the Apache webserver you need to add the gzip compression command inside the mod_deflate module at the end of the .htaccess file.
You can try the below command that can be used for activating the gzip compression on Apache using the .htaccess file.
Now, after enabling the gzip compression using cpanel you can check to gzip compression is activated or not. To do that you can use this online tool.
Hope this guide will help you to enable the gzip compression on your server or websites. But before doing any major changes to the site don’t forget to take backup.
Because sometimes the experiment can be wrong and you can lose your website data. Not only for this, do take a backup before making any major changes.