One of the drawbacks of Magento is currently its speed if default configuration is used. There are certain ways of making it run faster. The best one is to enable GZip compression by changing .htaccess file a little. You just need to uncomment part of the code. In my case, the speed increase was exactly 235%. Let’s start speeding up Magento!
Find the following lines in your Magento .htaccess file and replace them with the following code.
############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don’t compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary
# enable resulting html compression
php_flag zlib.output_compression on





# enable resulting html compression
php_flag zlib.output_compression on
also caused my site to throw a 500 error, but after taking it out the site is still 75% faster. Thanks for the great advice!
I’ve seen a similar saving with my magento website. Thanks so much for sharing! This is a MUST if you run on a shared hosting package!
WOW!!!
This just works. Thanks
TinyBrick’s LightSpeed module has some pretty impressive results when it comes to speeding up Magento. The price might be a little steep, but the performance increases I’ve seen are totally worth it.
You can see it here: [a href="http://zfer.us/4rilY"]TinyBrick’s Magento LightSpeed Module[/a]
Incredible !! Has solved my problem. On a clean mgto instalation admin panel go so so very very slow, and some times don’t answer.
I have folow this sugestion, and now, is excelet fast.
Thanks very very much for an excelent solution.
Regards,
this is awesome. just what i needed. thanks.
I need to make my magento site faster. There fore I applied your setting in htaccess but
# enable resulting html compression
php_flag zlib.output_compression on
particular code giving 500 error. Once removing the code the site runs but not faster.
How can I add this compression code and if I need to set anything in server, then how can I do that one. Please guide as your help will be entirely grateful for me.
this is throwing the same 500 server error for me as well. I removed the last line starting with “php” and the site is back up but not sure if speed is up or down.
Any one have any suggestions? My magento version is 1.5.1.0
great tip, my magento sites are now realy faster
Thank you for providing insight on the magento platform!
Very robust software and many tweaks available.
All the best!
Holy crap, my site just went supersonic! THANKS A BILLION!
Server error 500 solved.
I had as well this error and found that I needed to enable mod_headers. On Ubuntu a2enmod headers
Hope this helps somebody.
Major props to you bro. this was an excellent solution. we have 50+ sites and they were all running super super slow, now they’re lighting fast!! thanks again
Thank you so much for this post.
I have applies it on ver 1.3.2.4 and it works like charm.
Is there more tricks to speed it further?
I just like Formula 1
Awesome! It is a night and day difference. Excellent post. Deep thanks and God bless!
What a difference! Thank you so much for spreading the love around.
You can see the difference here http://tools.pingdom.com/fpt/
Our site with over 5k products loads in half the time now. Amazing!
Allan
thanks my site is faster now
Amazing!
This is why I love you guys!
85% increase in 3 minutes!
Also got the 500 error at first.
Thanks for the tip! pages load much quicker now
I’m sort of confused about what code I am replacing or adding? Do I find the lines of code you marked # and replace them with the lines of code beneath each line marked #? Sorry! And thank you!
I copied the above code and pasted it into my htaccess but I don’t see any difference in speed and Google is still asking for compression to be turned on. Any help would be fantastic – thanks!
Kate, yes, you just need to uncomment (remove the # before the line) of the lines in the .htaccess of your file.
It seems for me also that it’s faster also !
Great article……
really it speed up magento, it works for my site
http://www.craftsmandir.com
Great post! Thank you so much!
Great tip! Works perfectly on a Magento 1.4.1.1
Thank you for this tips.
I found an other blog, which had some additional informations on performance. This helped me a lot, so i can highly recommend also to all read the article “Magento on Steroids – Best practice for highest performance” !!!
You can find this at:
http://www.mgt-commerce.com/blog/magento-on-steroids-best-practice-for-highest-performance/
THX
John
This works! Thanks for the post. Every page running around twice as fast now.
awesome……………it works but depend on your server…
i have tried on 2 server…old server & latest tech
server… only working on latest tech server … cheerss…
Its the best method to speed up the magento. For those this method doesn’t work, try enabling zlib compression in php.ini
Set “zlib.output_compression = on” in php.ini
What I found out trying this code was that I had some bad requests in the HTML HEAD (head.phtml).. I had placed some css and js links in there and Magento didn’t like it. I’d already linked to the same files in the local.xml so the site was working but very slowly. Tested the site at pingdom.com.. saw all the warnings against the rogue js and css links.. removed the links from head.phtml and the site was instantly transformed. I also noticed that the scriptaculous js files were taking some time to load.. I’m using jquery for sliders etc so not sure I need them. Does anyone know if you can remove the scriptaculous files or do they do something elsewhere?
i have tried everything to make it work , however its giving me 500 error , if enabled the last line
I dont have php.ini file on my server , so no way to change that
Any help would be greatly appreciated
I’m running CE 1.7 I too had to comment out
“php_flag zlib.output_compression on” because of 500 server error, that being said, great improvement!