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.
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.
When you've opened the file, paste the following code at the end of the page and click Save.
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!