# Remove browser bugs (only needed for really old browsers)īrowserMatch ^Mozilla/4 gzip-only-text/htmlīrowserMatch \bMSIE !no-gzip !gzip-only-text/html # Compress HTML, CSS, JavaScript, Text, XML and fontsĪddOutputFilterByType DEFLATE application/javascriptĪddOutputFilterByType DEFLATE application/rss+xmlĪddOutputFilterByType DEFLATE application/vnd.ms-fontobjectĪddOutputFilterByType DEFLATE application/x-fontĪddOutputFilterByType DEFLATE application/x-font-opentypeĪddOutputFilterByType DEFLATE application/x-font-otfĪddOutputFilterByType DEFLATE application/x-font-truetypeĪddOutputFilterByType DEFLATE application/x-font-ttfĪddOutputFilterByType DEFLATE application/x-javascriptĪddOutputFilterByType DEFLATE application/xhtml+xmlĪddOutputFilterByType DEFLATE application/xmlĪddOutputFilterByType DEFLATE font/opentypeĪddOutputFilterByType DEFLATE image/svg+xmlĪddOutputFilterByType DEFLATE image/x-iconĪddOutputFilterByType DEFLATE text/javascript htaccess file on the website root directory through FTP(FileZilla). htaccess file but make sure mod_deflate will be enabled from the server as we saw above in the article. mod_deflate is now enabled successfully.Īnother way to enable GZIP Compression is editing website.After clicking Review tab > scroll down click Provision button > wait till the process end> once Provision finished successfully, hit the Done button to complete the process.Once you enable it, click Review tab, follow the screenshot below... Once you are on cPanel Customize page, Apache Modules > search deflate > enable mod_deflate.Click Customize button of cPanel Default box, see screenshot… On the EasyApache 4 page, we have to customize cPanel.Login to your WHM, search EasyApache in the search bar and click on EasyApache 4, see screenshot….Let’s see the WHM steps to enable GZIP Compression, please follow the screenshots they will help you more… If we have WHM access then below steps will help to enable GZIP Compression if you don’t have WHM then ask your hosting support. Ok, don’t worry, we will walk you through this. See below screenshot…Ībove we saw how we enabled GZIP compression or the deflate but what happen if this PHP Directive is not available in your cPanel. You have to find zlib.output_compression, enable it and hit the Apply button. Once you select your domain, available PHP Directives will show in the bottom.Now you are in MultiPHP INI Editor page, Select your domain on which you need to enable deflate, see screenshot below.
Basically is a mod_deflate, if this enables from the server then you can just add the script in the. There are two methods to enable GZIP compression, First one is from the server and the second is from the website. Let me show you in the screenshot.Īccording to the screenshot above, GZIP compression is enabled on the website. If it is active, it means GZIP is enabled on your website. We have to just check content-encoding: gzip HTTP response header in browser Devtool. GZIP compression never work on images because these are compressed in a different way How we check GZIP Compression enable or not?ĭon’t worry, this is not a complicated task, you can check this on your browser and all browsers support this. GZIP Compression is one of the easiest optimizations for a website. GZIP compression website files include HTML, Stylesheets, Javascript. GZIP is a file format and a software application used for website file compression and decompression.
If you guys know what is GZIP and how to enable it, that’s good but those who don’t know please read this tutorial till the end.
I’m doing the hosting by my self, I have one Amazon EC2 and a dedicated server in another part, on both servers everything was working fine before tha cPanel update or is possible the last update ok Hummingbird to cause something, just HTML GZIP is “inactive”, JavaScript & CSS are “Active”, this is happing on both servers, I have the server configured properly, GZIP Commpresion was working fine before and I didn’t touch the servers configurations.Hello, friends, today’s topic is how to enable GZIP compression on your web server.