🔥 Just Launched! Werra Premium Template for HyväSee it in Action

How to Install Varnish Cache on Windows

By Sanjay JethvaUpdated on May 22, 2025 6 min read

Caching is not just a process of storing data in a temporary storage unit but also one of the pillars of web performance optimization. It’s a powerful technique to make your website load faster. The website can’t be called optimized without using a caching system.

In Magento 2, cleaning and flushing cache is essential after modifying configuration files, to apply the required changes. It collects configuration from all modules, merges it, and saves the merged result to the cache. This cache also contains store-specific settings stored in the file system and database.

By default, you can configure Magento 2 ‘Caching Application’ from Stores > Configuration > Advanced > System > Full Page Cache . You can see ‘Varnish Cache’ option with the recommended label.

You have to install varnish cache on windows to use its functionalities and configure it as this post shows you how to do it.
Let me first introduce “varnish” to you and how it’s different from the Magento default cache.

Varnish cache is a web application accelerator which stores files or fragments of files in memory to reduce the response time and network bandwidth consumption on future equivalent requests. 

The varnish is a much quicker option and will give you the flexibility to cache most of your content, including HTML documents!

“Built-in “Full Page Cache” is enough for better performance”, and it’s the common misbelief while using Magento 2!

Individually, I recommend you to use built-in cache in development mode however when your store is in production mode, I strongly recommend using Varnish Cache for the optimal performance.

Steps to Install Varnish Cache on Windows

1. Check the setup version and click on Next button.

install varnish cache step1

2. Choose the installation type. Here I want to install it from the internet.

varnish step2

3. Select the root directory where you want to install it.

varnish step3

4. Select local package directory from “Browse” button and click on the “Next” button.

varnish step 4

5. Select the site(s) from the list or add your site to the list by entering it in User URL textbox, and click “Add”.

varnish step 5

6. After progressing, the next dialogue box will display several packages and allow you to select packages to install.

varnish step 6

7. Search for ‘varnish’ in the Search filter of Select Packages popup, and then select the appropriate package and click “Next”.

varnish-step-6.1

8. It will display the list of installation packages to review and confirm. Click on “Next” once reviewed.

varnish step 6.2

9. Click on “Next” after it completes 100% progress.

varnish step 6.3

10. After it finishes the installation, double click its icon that resides on the desktop.

logo

You can see the command prompt by double-clicking this icon.
To check if varnish is installed or not, run the following command in the terminal.

varnishd -V

It returns the version of Installed varnish.

command prompt

Finally, the installation is done. You can configure varnish cache from Magento 2 store’s backend.

That’s it!

Quite lengthy but installed!

Feel free to share the solution with Magento 2 community via social media.

Thank You.

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.