Enable GZip Compression On Bluehost

Pinterest LinkedIn Tumblr

In a day where web browsers are becoming the cornerstone of modern computing capable of incredible animations and driven by the most advanced technologies, we need to do our part to make the web faster. Analogous to “zipping” local files to save storage, GZip aims to make the web faster by serving compressed pages and thereby saving bandwidth on both ends at the cost of server CPU time (although this is often negligible). Read more about GZip here

Before starting off, verify that your site is not serving GZipped pages here:

  1. Login to your Bluehost account CPanel.
  2. Navigate down to the Software/Services section and click on PHP Config. Select “PHP 5.4 (FastCGI)” and hit save. Then go back to the main CPanel menu. (Note: PHP 5.4 is compatible with most things at this point, but this method will work with PHP 5.2 FastCGI as well.)bh-cpanel-php
  3. Navigate to the File Management section and click File Manager. Check “Web Root” and “Show Hidden Files (dotfiles)” and hit
  4. On the editor page, scroll down till you find “php.ini” Highlight it and click Edit at the
  5. Search the file (ctrl+f on Windows, command+f on a Mac) for “zlib.output_compression” and look for the following instance: bh-gzip-zlib
  6. Change “Off” to “On” and hit Save Changes in the top right of the editor.
  7. Go back to the main CPanel. Scroll down to the same place as you did in Step 2 (see above) except this time click Process Manager. Once there, Force Kill all the processes you see (this essentially will reboot your PHP instance). Now visit your site using any browser. You should now have GZip compression enabled.

Drop me a line if this walkthrough worked for you and/or you run into issues! These instructions should be applicable to most shared hosts (especially if they use CPanel backends).


  1. Thank you!!! Worked just like you said. Instructions were very easy to follow. Thanks again!

  2. Thank you for your share,but gzip still not enabled,I have try many times,but not work…

      • Sounds good. I decided to let Google host my jQuery at least, and I’m assuming they gzip it. Do you suggest I let Cloudfare host my jQuery too? One source I read noted they were faster than Google’s CDN. Thanks for the post though, it got me over the first, mysterious part of gzipiness.

        • Anytime man! Yeah, I’ve gone with Cloudflare’s repository (CDNJS) since it’s more comprehensive. Make sure you use the “.min.js” version of JQuery to save more bandwidth.

Write A Comment

Pin It