Using varnish to speed up magento

It ‘s look a very difficult task but I will help you to make it simple in Using varnish to speed up magento. Now let ‘s go.

The issue

  • Magento is very extensive and complex
  • There are a lot of extensions of varying quality
  • This can cause shops to become too slow
  • Which impacts turnover

First solution

  1. Better hardware
  2. Reduce number of extensions
  3. Dont use Magento! 🙂

Request normal and request via Varnish

1. Request normal



magento normal request

2. Request via Varnish

request via varnish

As you see:

  • User makes request
  • Varnish passes request to Magento
  • Varnish saves response in memory
  • And serves it to the user

And what happen next time if the cache hit?

varnish serve cache

It ‘s so nice to have the system like this. It should make the magento site work really fast with response time < 100ms

Of course, there are some pages what we can’t cache like logged page, personal page, cart page. In this time the page load will be back to normal without cache.

Using varnish

Well, we talk too much. Let ‘s focus on the practice how to use varnish. If you have your own hosting/server and your server support varnish cache. You can consider some useful links what can make varnish work well

But there are some hosting/server provider with advance optimise varnish cache they can provide the extension for magento what work even faster the general extension. In this case, you can check SiteGround Magento Hosting with GrowBig or GoGeek package. They will provide back end varnish and the SiteGround Varnish extension for magento to install and integrate varnish to your magento quite simple.

If you want more magento hosting solutions you can check our article about best magento host solutions.

Welcome any comment!


8 responses to “Using varnish to speed up magento”

  1. Fahad Rafiq Avatar
    Fahad Rafiq

    It has become a normal routine that varnish never works with Magento even in their every updates.
    Maaz Test Magento (Default) with Phoneix Page Cache Plugin (Git Version). But he didn’t found any cookies set. Without Cookies Set form_key is not work properly in Magento. Finally he compatible Varnish with Magento 1.9.x here:

  2. magentohostsolution Avatar

    Thanks Fahad, we will consider to update it to our article to make it more useful.

  3. Fahad Rafiq Avatar
    Fahad Rafiq

    Great !!

  4. Potato Commerce Avatar

    An ultimate combo-solution to improve your store performance. Buy both and save 10%.
    Full Page Cache extension – is a crucial solution that significantly speeds up your Magento store. This extension reduces server load, decreases page load time and thus enhances website google ranking, increases sales conversion.
    * Significantly speeds up your website
    * Dynamic blocks support, easiest ever API
    * Cache crawler
    * Debug mode (unique feature)
    * Decrease of your server load
    * Reduces hardware requirements and thus saving on server costs
    * Better search engine indexing and Google ranking (since Google factors website speed into search ranking)
    * Achieve a time to first byte (TTFB) of less than 150ms! See our demo for the proof.
    * Clean code!
    Compressor – JS and CSS minify extension – Compressor Magento Extension – Merge, minify and compress CSS & JS files and Images. Better page speed load performance. Less requests, less file sizes.
    * Decreases number of requests
    * CSS and JS minification
    * GZIP files
    * Image optimization worker
    * Defer script exclusion
    You can find these products at our website –

  5. Nancy Avatar

    I use Redis as Magento back end cache. It works brilliantly with Magento. I installed it using the instructions at

  6. فروشگاه اینترنتی Avatar

    Thank you for your helpful post.
    your post makes my magento website more rapid.
    please check it on my web address.

  7. فروشگاه اینترنتی Avatar

    Tnx for this….
    Its so impressive..

  8. Julie Avatar

    There is a very useful way to optimize Magento site speed is deferring JavaScript loading till the last moment after all HTML and CSS. It means that JavaScript files are put to the end of page, therefore the web browser will load HTM and CSS before loading these JavaScript files. This leads to loading time be reduced and magento site perform faster than before.
    To make this JavaScript parsing easier, we had better not do it manually, let’s use an extension instead because of convenience and simplicity.
    For example: