Apache mod_deflate module is used for compressing content before serving to client. You can configure compression only if your hosting provider has enabled the mod_deflate module in Apache.
The WHM administrators can enable Gzip globally for all cPanel accounts using WHM control panel. Non cPanel users can enable gzip in Apache web server or Nginx web server using command line.
Let’s use the following steps to enable Apache gzip compression using the cPanel web interface.
Step 1 – Login to cPanel Account
Firstly login to your cPanel account using the web interface. The default cPanel interface is accessible on ports 2083 (SSL) and 2082 (non-SSL). The default URL of cPanel access could be like:
https://mydomain.com:2083
Log in with the cPanel credentials.
Step 2 – Open Optimize Website Panel
After login in to the cPanel account, You will find the option Optimize Website under the Software section. Just click on Optimize Website icon to open settings.
Step 3 – Enable Apache Gzip Compression
On this page, you will find three options to select. Get below details of each option and select the appropriate option.
- Disabled – Select this option to disable gzip compression for you website and click
Update Settings . - Compress all content – Select this option to compress all your website’s content and click
Update Settings . - Compress the specified MIME types – Select this option and input the MIME types in below text box to compress specific files only and click
Update Settings . MIME types list on Wikipedia
and you have all done. You have successfully enabled Gzip compression for your site. Use this link to verify the compression.
24 Comments
Thanks for sharing the data compression procedure.
Just also be aware that CPU utilization is increased 25-35% when compression is enabled ;0)
Thanks a lot . It’s really working.
Thanks a lot 🙂
Is after doing this, will it affect the website in any sense like reducing the quality of images or any other issues?
Thanks for offering this helpful post on gzip.
Thanks heaps, worked like a treat.
Hello. Thanks for sharing this steps. If I enable all compression, will this affect images loading?
Thanks for sharing valuable information. This is very importance for me.
Thanks for the info
Thanks a lot . it worked
I have used the above said settings , but on checking the gzip compression it is showing me that gzip is not enabled
It was useful ;
Do we need to activate something in WHM ?
Thanks
Nothing more to activate.
You need to enable mod_deflate on the server if the option does not show up in cPanel
great and tank for topic
right to the point, thank you
thank you RAHUL it was excellent
its active in my website now with your guide
dear RAHUL
thank you for your great article
i activate this in my website
but can you publish a new article for how to activate gzip in DirectAdmin?
Thanks a lot. This has helped increase my website’s speed and reduce page load times.
Thank u Sir
Cheers, that did the trick. Thanks for making it easy!
You are really genius.
Thanks
Thanks boss.. superb steps.