Optimize Website Speed
To enable compression for all your website output automatically through the Apache webserver on a cpanel site control panel, do this:
1) - Server administrator Step from WHM
1.1) - Make sure Apache mod_defalt enabled on your server.
Via root WHM access at the following menu path: WHM: Main >> Software >> EasyApache (Apache Update)
1.2) - Enable KeepAlive
WHM Home » Service Configuration » Apache Configuration » Global Configuration.
In most cases, I'd recommend the use of Keepalives, but on busier servers I usually have this set at 3 seconds instead of the default 15.
2) - Website administrator Step from cpanel
From Cpanel for the site, go into "Optimize Website" and you can enable page compression from there.
You can manually enable gzip compression in .htaccess with code like this:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
To see if gzip compression is working use our gzip compression tool (https://varvy.com/tools/gzip/).
Also consider using the page speed tool (https://varvy.com/pagespeed/) which will test compression and many other factors.