What is gZip Compression?

What is gZip Compression?

gZip is a compression utility that creates files with lossless data compression. This means that when expanded (i.e. decompressed) the data will look exactly like it did before compression. Nothing is lost in the processes. gZip files usually end in the suffix "gz" - you may notice this on your website's backup files. In short, these smaller files transfer quickly and easily, and your software decompresses so they're usable in the human world.

How do I Know if gZip Compression is Enabled?

There's a quick and easy tool to check if you have this feature enabled.  Visit the gZip Compression Test site.  Enter your URL and click Test.  You'll know within moments if gZip is working on your site.

If it's enabled on your site, you'll see a screen like this one:

If it's not working, you'll see a screen like this one:

What to do if gZip Compression Isn't Working

Enable gZip Compression in OpenCart

The majority of Earth Girl Hosting clients use OpenCart and WordPress. Here's how to enable it in OpenCart:

Log in to your OpenCart admin area.

On the left-hand menu, select the System > Settings.

Click the Server tab and set Output Compression Level (we recommend between 4 and 6).

When you're done, click Save.

Be Cautious!

Clients are welcome to ask our hosting support staff for help in editing the .htaccess file.  One character out of place in this file and your site could go down.

Enable gZip Compression in .htaccess

To enable gZip Compression in your .htaccess file (via cPanel), navigate to your cPanel. (https://yoursite.com/cpanel) and log in.

Use the search box to find File Manager and click the icon.

In the left-hand tree, click the public_html folder.

Once you open this folder, its contents will display in the right-hand pane. Highlight .htaccess by clicking it once, then click the Edit option on the top bar.

You'll then see a pop-up window where you'll click Edit.

I Don't Have an .htaccess File!

It Could be Hidden: Unhide Your .htaccess File

If you don't see .htaccess, it's possible it doesn't exist but it's more likely that system files are hidden. Check this by clicking the Settings button on the top right of the page. This will display a pop-up where you can enable Shop Hidden Files (dotfiles) and click Save.

It May Not Exist: Create an .htaccess File

If you've determined the file doesn't exist, you can easily create it by clicking the +File button on the top left of your File Manager. Be sure you're still in the public_html folder.

You'll see a pop-up window where you'll enter the filename in the first field, then click Create New File. Be sure you add a dot (period) before the filename.

.htaccess

When you've opened the file, paste the following code at the end of the page and click Save.

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/x-javascript application/javascript text/javascript text/css text/html text/xml
</IfModule>

If you have any trouble with gZip compression on your Earth Girl hosted site, contact us via the support desk. We are happy to help!

 


Photo by Marc-Olivier Jodoin on Unsplash

About Earth Girl Hosting

Earth Girl Hosting offers web hosting for any type of website, including WordPress, OpenCart, Joomla!, Drupal, and more. Free SSL, free daily backups, 24/7/365 North American support by phone & ticket.

3 Comments

  1. […] one more tool in the WordPress treasure chest: GZIP compression, which compresses large files that can take too much time to download to a user’s computer or […]

  2. […] GZip Compression: GZip compression works on web files just as your file compression tool in your computer system functions […]

  3. […] Gzip compression can reduce the size of the facts your website sends via up to 90% and so dramatically speeds up loading time whilst lowering a traveller’s statistics utilization. the use of gzip is fairly endorsed by means of Google; however, some internet hosts do no longer allow their clients to use it – mainly on shared web hosting plans. test cautiously that you web host does. […]

Leave a Comment





This site uses Akismet to reduce spam. Learn how your comment data is processed.