Site icon MageComp Blog

How to Implement Varnish Cache in Magento 2

How to Implement Varnish Cache in Magento 2

How to Implement Varnish Cache in Magento 2

“The higher the performance of the website is, the higher conversion rate it gets.”
Caching is an important factor for any website or store to boost their performance and default Magento 2.x is comparatively much faster than 1.x but what if you still want to optimize your Magento 2 store with lightning speed?

With Magento 2.x update over Magento 1.x, Magento get different Magento updates, but the one of significant difference is now Magento 2 supports Varnish. Nowadays, Redis & Varnish are significantly used to improve the performance of Magento store.

What is Varnish?

Some of great advantages of varnish are…

Implementing Varnish in Magento 2:

Before getting started with Varnish, you first need to enable it through hosting provider. Once it’s done, it will trigger the server configuration update. After a few minutes you can use it in your node.

Follow these steps to Configure Varnish.

  1. Firstly, you have to log into your Magento as administrator.
  2. After Login, Check Varnish from full page cache checked list using following path.
    Stores > Configuration > Advanced > System > Full Page Cache
  3. Enter TTL value.
  4. Expand Varnish configuration and Insert appropriate information:
    Backend Host: localhost or 127.0.0.1
    Backend Port: 8081
  5. Now, Save your VCL Config using “Save Config” button available at the top right.
  6. At last, Export VCL for Varnish 4.

Voila, now your Web store is ready to serve faster contents like never before. Do comment if you are facing any issue while setting up varnish with your Magento Store. Also, your suggestions and feedback are always welcomed.
Happy Varnishing!

Exit mobile version