Enable HTTP (gzip) compression w3 total cache

Brooke Lustig

New Member
Hello everyone,

I have a wordpress site that I just tested with different page speed tools and it turns out we haven't enabled HTTP (gzip) compression even though the box is ticked in on the w3 total cache plugin. Being completely green with all this I'm wondering if there is something I need to do on the hosting side (cpanel) to be able to use this feature? My hosting is the Managed SSD-2 VPS package.
 

KH-DavidL

Abuse & Documentation Specialist
Staff member
Hello everyone,

I have a wordpress site that I just tested with different page speed tools and it turns out we haven't enabled HTTP (gzip) compression even though the box is ticked in on the w3 total cache plugin. Being completely green with all this I'm wondering if there is something I need to do on the hosting side (cpanel) to be able to use this feature? My hosting is the Managed SSD-2 VPS package.
You'll want to use Easy Apache ( https://wiki.knownhost.com/control-panels/cpanel-whm/what-is-easyapache-and-how-do-i-use-it ) and make sure that mod_deflate is enabled. Of course you can always open a ticket with our Support Department and we can get it enabled for you.
 

Brooke Lustig

New Member
Hi David, thanks for the quick response, is there any cons of enabling it? I have a membership site on wordpress and my goal is just to enable gzip compression to speed the site up a bit. Would you recommend enabling it?

Thank you again.
 

KH-DavidL

Abuse & Documentation Specialist
Staff member
Hi David, thanks for the quick response, is there any cons of enabling it? I have a membership site on wordpress and my goal is just to enable gzip compression to speed the site up a bit. Would you recommend enabling it?

Thank you again.
I'd definitely recommend enabling it from my personal experiences. I'm not aware of any cons of enabling it. This link may give more insight: http://www.webperformance.com/library/reports/moddeflate/
 

Dion

Member
W3TC uses ob_start('ob_gzhandler') to enable GZip in PHP-based output, which is the wrong way to do it. (W3TC does a lot of things wrong, but that's a different topic. ;) )

If you add something like the following in the .htaccess file for your WordPress site:

Code:
  <IfModule deflate_module>
     <filesMatch "\.(js|css|html|php)$">
       SetOutputFilter DEFLATE
     </filesMatch>
   </IfModule>
GZip will be used for all relevant files if mod_deflate was built into Apache. Note that you should disable GZip in W3TC if you add the above to your .htaccess file.
 

Brooke Lustig

New Member
Thanks for the input everyone, looks like I'm going to ask support to enable it, just scared of breaking the site/hosting set up I suppose. Thanks again for the advice!
 
Top