{"id":1527,"date":"2021-01-15T10:46:34","date_gmt":"2021-01-15T10:46:34","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/install-varnish-cache-on-windows\/"},"modified":"2025-05-22T11:14:18","modified_gmt":"2025-05-22T05:44:18","slug":"install-varnish-cache-on-windows","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/install-varnish-cache-on-windows\/","title":{"rendered":"How to Install Varnish Cache on Windows"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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\u2019s a powerful technique to make your website load faster. The website can\u2019t be called optimized without using a caching system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default, you can configure Magento 2 \u2018Caching Application\u2019 from&nbsp;<strong>Stores &gt; Configuration &gt; Advanced &gt; System &gt; Full Page Cache<\/strong>&nbsp;. You can see \u2018Varnish Cache\u2019 option with the recommended label.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You have to<strong>&nbsp;install varnish cache on windows<\/strong>&nbsp;to use its functionalities and configure it as this post shows you how to do it.<br>Let me first introduce \u201cvarnish\u201d to you and how it\u2019s different from the Magento default cache.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The varnish is a much quicker option and will give you the flexibility to cache most of your content, including HTML documents!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u201cBuilt-in \u201cFull Page Cache\u201d is enough for better performance\u201d, and it\u2019s the common misbelief while using Magento 2!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Individually, I recommend you to use built-in cache in development mode however when your store is in production mode, I strongly recommend using&nbsp;<a href=\"https:\/\/experienceleague.adobe.com\/en\/docs\/commerce-operations\/configuration-guide\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">Varnish Cache<\/a>&nbsp;for the optimal performance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Install Varnish Cache on Windows<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Full Cygwin environment with varnish package\n<ul class=\"wp-block-list\">\n<li>32 bits installer:&nbsp;<a href=\"https:\/\/cygwin.com\/setup-x86.exe\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/cygwin.com\/setup-x86.exe<\/a><\/li>\n\n\n\n<li>64 bits installer:<a href=\"https:\/\/cygwin.com\/setup-x86_64.exe\" target=\"_blank\" rel=\"noreferrer noopener\">&nbsp;https:\/\/cygwin.com\/setup-x86_64.exe<\/a>\n<ul class=\"wp-block-list\">\n<li>Here I\u2019m using 64 bits installer<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Double click on setup-x86_64.exe and start the installation.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">1. Check the setup version and click on&nbsp;<strong>Next&nbsp;<\/strong>button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step1.png\" alt=\"install varnish cache step1\" class=\"wp-image-12544\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">2. Choose the installation type. Here I want to install it from the internet.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step2.png\" alt=\"varnish step2\" class=\"wp-image-12545\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">3. Select the root directory where you want to install it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step3.png\" alt=\"varnish step3\" class=\"wp-image-12546\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">4. Select local package directory from \u201c<strong>Browse<\/strong>\u201d button and click on the \u201c<strong>Next<\/strong>\u201d button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step-4-1.png\" alt=\"varnish step 4\" class=\"wp-image-12548\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">5. Select the site(s) from the list or add your site to the list by entering it in User URL textbox, and click \u201cAdd\u201d.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step-5.png\" alt=\"varnish step 5\" class=\"wp-image-12549\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">6. After progressing, the next dialogue box will display several packages and allow you to select packages to install.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step-6-1024x552.png\" alt=\"varnish step 6\" class=\"wp-image-12550\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">7. Search for \u2018varnish\u2019 in the&nbsp;<strong>Search&nbsp;<\/strong>filter of Select Packages popup, and then select the appropriate package and click \u201cNext\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step-6.1-1-1024x544.jpg\" alt=\"varnish-step-6.1\" class=\"wp-image-12779\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">8. It will display the list of installation packages to review and confirm. Click on \u201cNext\u201d once reviewed.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step-6.2.png\" alt=\"varnish step 6.2\" class=\"wp-image-12554\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">9. Click on \u201cNext\u201d after it completes 100% progress.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step-6.3.png\" alt=\"varnish step 6.3\" class=\"wp-image-12556\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">10. After it finishes the installation, double click its icon that resides on the desktop.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/logo.png\" alt=\"logo\" class=\"wp-image-12557\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">You can see the command prompt by double-clicking this icon.<br>To check if varnish is installed or not, run the following command in the terminal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>varnishd -V<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It returns the version of Installed varnish.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/varnish-step-7.png\" alt=\"command prompt\" class=\"wp-image-12558\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Finally, the installation is done. You can&nbsp;<a href=\"https:\/\/experienceleague.adobe.com\/en\/docs\/commerce-operations\/configuration-guide\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">configure varnish cache from Magento 2<\/a>&nbsp;store\u2019s backend.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Quite lengthy but installed!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Feel free to share the solution with Magento 2 community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank You.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u2019s&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1527","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1527"}],"version-history":[{"count":4,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1527\/revisions"}],"predecessor-version":[{"id":14556,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1527\/revisions\/14556"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}