Enable GZip Compression On Bluehost

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: https://checkgzipcompression.com/.

  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 go.bh-cpanel-php-filemgmt
  4. On the editor page, scroll down till you find “php.ini” Highlight it and click Edit at the top.bh-cpanel-editor
  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).

You might also like

Leave A Reply

Your email address will not be published.

  1. Osmyn says

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

  2. Marco says

    Thanks so much!

  3. Ed Pope says

    I ran through this & I think he did everything, including the Force Kill, but when I check it, it still says I’m not using gzip. My website is http://pinewideplankflooring.net – Any ideas on what’s wrong?

  4. eric says

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

    1. Rishi says

      What’s your domain name? Are you sure you’ve reset your PHP process?

      1. eric says

        http://www.eneltec-led.com/ yes ,I have reset PHP process like you say.Thank you!

  5. N says

    Thanks, works like a charm!!

    1. Rishi says

      No problem! I’m glad it helped!

  6. Springboard SEO says

    Helpful post! Unfortunately, it seems that only the html files themselves are being compressed, but not JS.

    1. Rishi says

      Right – I’d recommend you use this in tandem with Cloudflare’s service. =)

      1. Springboard SEO says

        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.

        1. Rishi says

          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.

      2. Springboard SEO says

        Page load times have dropped drastically, with the free Cloudfare plan, to boot. Unreal! Thanks!