Apache mod_deflate module is used for compressing content before serving to client. You can configure compression only if you hosting provider has enabled mod_deflate module in Apache.
Let’s use following steps to enable Apache gzip compression using cPanel web interface.
Step 1: Login to cPanel Account
First login to your cPanel account using web interface. The default url of cPanel access will be like below
Step 2: Open Optimize Website Panel
After login you will see Optimize Website link under Software/Services section. Click to open Optimize Website
Step 3: Enable Gzip
At this page you will find three options to select. Get below details of each option and select appropriate option.
3.1 Select Disabled to disable gzip compression for you website and click
3.2 Select Compress all content option to compress all your website’s content and click
3.3 Select Compress the specified MIME types option and input the MIME types in below text box to compress specific files only and click
and you have all done. You have successfully enabled Gzip compression for your site. Use this link to verify the compression.