OpenCart comes with the ability to enable GZIP compression. GZIP compression helps your pages load faster by compressing them when they are sent to the web browser to be rendered. When using the Google Page Speed tool, they recommend using compression. GZIP compression can be enabled through your OpenCart dashboard.

We do not recommend using compression unless you are on a VPS or dedicated server since enabling GZIP compression increases your server resource usage.

  1. Log into your OpenCart Dashboard
  2. Go to System > Settings
  3. Select your store by clicking “Edit” next to it
  4. opencart_gzip_1

  5. Go to the “Server” Tab
  6. Go to “Output Compression Level” and set the value between 0-9 (typically 4 – 6 is recommended)
  7. opencart_gzip_2

  8. Click “Save

If you need further assistance please feel free to ask a question on our support center.

Continued Education in Course OpenCart
You are viewing Section 42: 317: Enabling GZIP compression in OpenCart
Section 41: 318: Using web browser caching in OpenCart
Section 43: 324: Removing the Product Count to speed up OpenCart
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-07-05 9:30 am

I kept same above what you said but not working Gzip Compression

thanks & Regards

Ramesh

Staff
9,968 Points
2014-07-06 1:55 am
Hello ramesh

How are you testing to see if the Gzip compression has been successfully enabled? As mentioned in our an introduction to Gzip and mod_deflate guide you can use this site:

http://www.whatsmyip.org/http-compression-test/

As also mentioned in that guide you can also enable Gzip compress in your .htaccess file with this:

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


Please let us know if that works for you.

- Jacob
n/a Points
2014-11-12 1:35 pm

I did this but only HTML files are compressed. Doesn't work for .css or .js files.

 

Staff
18,399 Points
2014-11-12 2:37 pm
Hello Danigar,

Sorry for the problem with Gzip. Try adding the following code under your the "AddOutputFilterByType" lines:


Header set Content-Encoding x-deflate
# Header set Content-Encoding compress
# Header set Content-Encoding x-gzip


You can find this solution discussed here. They discuss several alternatives if this option does not work.

Hope that helps to resolve your problem!

Regards,
Arnel C.
n/a Points
2014-11-13 7:02 pm

Thanks for that link Arn, I've tried what they say there but, it still won't work. I supose there's something on the apache configuration that should be tweaked, but being a shared hosting I don't have access to it.

Staff
10,994 Points
2014-11-13 7:11 pm
Hello Danigar,

Thank you for contacting us. This setting should work on our servers, but I was unable to locate an account with us to confirm.

You can check that gzip is enabled by looking in your phpinfo page.

Thank you,
John-Paul

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

6 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!