{"id":777,"date":"2021-09-01T14:38:41","date_gmt":"2021-09-01T11:38:41","guid":{"rendered":"https:\/\/plumrocket.com\/learn\/?p=777"},"modified":"2022-10-05T18:01:46","modified_gmt":"2022-10-05T15:01:46","slug":"how-to-configure-magento-2-varnish-in-a-few-clicks","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/learn\/magento-2-varnish-configuration","title":{"rendered":"How to Configure Magento 2 Varnish in a Few Clicks"},"content":{"rendered":"\n<p>Caching is the main part of any web server. With platforms like Magento 2, it is more important to install the cache for one essential reason. It can drastically reduce the load on your online store and&nbsp;speeds up the page response&nbsp;which <a href=\"\/magento-performance-optimization\">improves performance<\/a> and user experience, and enhances sales. Among the variety of cache options on today\u2019s market, Varnish is one of the most popular to consider. So, let\u2019s explore the importance of Magento 2 Varnish and find out the steps of its installation on your store.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"586\" height=\"440\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/magento-2-varnish.png\" alt=\"How to Configure Magento 2 Varnish in a Few Clicks\" class=\"wp-image-779\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/magento-2-varnish.png 586w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/magento-2-varnish-300x225.png 300w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/figure><\/div>\n\n\n\n<h2>What is Varnish and How Does It Work with Magento 2&nbsp;<\/h2>\n\n\n\n<p>Varnish Cache is an open-source web application accelerator that is designed for content-heavy dynamic websites like Magento 2. Since Varnish is used only with HTTP protocol, it is also known as caching HTTP reverse proxy. However, there is a possibility to configure Varnish with HTTPS protocol with the help of NgniX acting as a proxy.<\/p>\n\n\n\n<p>If you are running Magento 2, it is essential to know that the platform supports Varnish 4.x and 5.x. Below, you can see a basic view of Varnish in your Magento topology:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"586\" height=\"912\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/magento-2-varnish-2.png\" alt=\"Basic view of Varnish in Magento topology\" class=\"wp-image-780\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/magento-2-varnish-2.png 586w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/magento-2-varnish-2-193x300.png 193w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/figure><\/div>\n\n\n\n<p>As you can see in the preceding figure, HTTP requests to the webserver result in a number of requests for CSS, HTML, JavaScript, and images. All of them are also called assets. Varnish \u0421ache goes next and passes all requests to the web server.<\/p>\n\n\n\n<p>Since the web server returns the assets, the cacheable assets are stored in Varnish. Any future requests are fulfilled by Varnish which means the requests no longer reach the server. As a result, Varnish returns the cached content very quickly. Hence, you get a faster response time to return content to visitors and a reduced amount of requests passing straight to Magento 2.<\/p>\n\n\n\n<p>It is important to remember that assets cached by Varnish either expire automatically at a configurable interval or are replaced by newer versions of the same assets. Also, you can clear the cache manually in 2 different ways:<\/p>\n\n\n\n<p>1) Using the web interface, follow the path:<\/p>\n\n\n\n<p><strong>Magento Admin Panel\u2192System\u2192Cache Management<\/strong><\/p>\n\n\n\n<p>After that, click \u201cFlush Magento Cache\u201d<\/p>\n\n\n\n<p>2) Using the command line, run the command:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ php bin\/magento cache:clean<\/code><\/pre><\/div>\n\n\n\n<p>Note,&nbsp;<a href=\"https:\/\/devdocs.magento.com\/guides\/v2.3\/config-guide\/varnish\/config-varnish.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Magento<\/a>&nbsp;recommends using Varnish in production since built-in full-page caching is much slower than Varnish Proxy.<\/p>\n\n\n\n<h2>How to Benefit from Magento 2 Varnish as HTTP Processor&nbsp;<\/h2>\n\n\n\n<p>Varnish includes Varnish Configuration Language (VCL) that is the core configuration mechanism for this cache. It is a domain-specific language (DSL) used for writing hooks. The hooks are called at critical points of request handling.<\/p>\n\n\n\n<p>Compared to other HTTP caches, VCL makes Varnish more adjustable and configurable. After being loaded, a VCL script is translated to \u0421 and compiled to a shared object by the system compiler. Then it is loaded straight into Varnish that can be configured without a restart.<\/p>\n\n\n\n<p>Each request passes through Varnish which lets you influence which way the request is handled. All you require is to change the VCL code. To be more specific, you can:<\/p>\n\n\n\n<ul><li>assign certain requests to particular backends;<\/li><li>alter the requests and responses;<\/li><li>make Varnish perform various actions relying on the request properties.<\/li><\/ul>\n\n\n\n<p>So, that\u2019s exactly why Varnish stands out among other HTTP processors. Keep reading to learn how to set up Varnish for your Magento 2 store in the right way.<\/p>\n\n\n\n<h2>How to Install and Configure Varnish Cache with Apache 2 Web Server&nbsp;<\/h2>\n\n\n\n<p>Now, when you have become acquainted with the main advantages of Magento 2 Varnish, it is important to learn the process of cache installation with the platform. However, before completing a task, you should set up Varnish with Apache 2 by taking the following steps:<\/p>\n\n\n\n<p>1. Go to Console and use the command to start installing Varnish:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo apt-get install varnish<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"726\" height=\"408\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/1.png\" alt=\"Magento 2 Varnish Configuration - Installing Varnish in Console\" class=\"wp-image-781\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/1.png 726w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/1-300x169.png 300w\" sizes=\"(max-width: 726px) 100vw, 726px\" \/><\/figure><\/div>\n\n\n\n<p>2. If you want to disable, enable or turn on Varnish automatically, you can execute the following commands:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo systemctl stop varnish.service\n$ sudo systemctl start varnish.service\n$ sudo systemctl enable varnish.service<\/code><\/pre><\/div>\n\n\n\n<p>3. To check Varnish\u2019s status, you should run the command:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo systemctl status varnish.service<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"726\" height=\"380\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/2.png\" alt=\"Magento 2 Varnish Configuration - Using different port for Apache 2\" class=\"wp-image-782\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/2.png 726w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/2-300x157.png 300w\" sizes=\"(max-width: 726px) 100vw, 726px\" \/><\/figure><\/div>\n\n\n\n<p>4. It is important to configure Varnish to listen to all traffic on Port 80 that is a default port for Apache 2. In this case, you should use a different port like 8080 for this web server. To put the rules that redirect all the traffic from port 80 to 8080, open the file with the help of the command:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo nano \/etc\/apache2\/ports.conf<\/code><\/pre><\/div>\n\n\n\n<p>and change line&nbsp;<em><strong>Listen 80&nbsp;<\/strong><\/em>to<em><strong>&nbsp;Listen 8080<\/strong><\/em><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"729\" height=\"413\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/3.png\" alt=\"Magento 2 Varnish Configuration 4\" class=\"wp-image-783\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/3.png 729w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/3-300x170.png 300w\" sizes=\"(max-width: 729px) 100vw, 729px\" \/><\/figure><\/div>\n\n\n\n<p>5. The next step is to modify your Virtualhost configuration. In our case apache virtual host configuration file is located here:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo nano \/etc\/apache2\/sites-available\/000-default.conf<\/code><\/pre><\/div>\n\n\n\n<p>Then, change line<strong>&nbsp;<em>&lt;VirtualHost *:80&gt;&nbsp;<\/em><\/strong>to<strong><em>&nbsp;&lt;VirtualHost *:8080&gt;.&nbsp;<\/em><\/strong><\/p>\n\n\n\n<p>6. After that, you should restart Apache2 by running the following command in the file:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo systemctl restart apache2.service<\/code><\/pre><\/div>\n\n\n\n<p>7. Now, you can see that the Apache web server works on&nbsp;<strong>8080<\/strong>&nbsp;port:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"976\" height=\"563\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/4.png\" alt=\"Magento 2 Varnish configuration - Hello World Message\" class=\"wp-image-784\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/4.png 976w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/4-300x173.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/4-768x443.png 768w\" sizes=\"(max-width: 976px) 100vw, 976px\" \/><\/figure><\/div>\n\n\n\n<p>8.&nbsp; Now, you should set up Varnish to listen to Port 80. Open the file:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo nano \/etc\/default\/varnish<\/code><\/pre><\/div>\n\n\n\n<p>Then, insert the code:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">DAEMON_OPTS=\"-a :80 \\\n-T localhost:6082 \\\n-f \/etc\/varnish\/default.vcl \\\n-S \/etc\/varnish\/secret \\\n-s malloc,256m\"<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"725\" height=\"413\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/5.png\" alt=\"Setting up Varnish to listen to Port 80\" class=\"wp-image-787\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/5.png 725w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/5-300x171.png 300w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/figure><\/div>\n\n\n\n<p>9. Open file <em>\/etc\/varnish\/default.vcl<\/em> and set up the following parameters:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">backend default {\n.host = \"127.0.0.1\";\n.port = \"8080\";\n}<\/code><\/pre><\/div>\n\n\n\n<p>10. Insert the configurations in the file:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo nano \/lib\/systemd\/system\/varnish.service<\/code><\/pre><\/div>\n\n\n\n<p>Change the line:<\/p>\n\n\n\n<p><strong>ExecStart=\/usr\/sbin\/varnishd -j unix,user=vcache -F -a :6081 -T localhost:6082 -f&nbsp;\/etc\/varnish\/default.vcl<\/strong><\/p>\n\n\n\n<p>with<\/p>\n\n\n\n<p><strong>ExecStart=\/usr\/sbin\/varnishd -j unix,user=vcache -F -a :80 -T localhost:6082 -f&nbsp;<strong>\/etc\/varnish\/default.vcl<\/strong><\/strong><\/p>\n\n\n\n<p>11. Restart Varnish and Apache2 with commands:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo systemctl restart apache2.service\n$ sudo systemctl restart varnish.service<\/code><\/pre><\/div>\n\n\n\n<p>12. Let\u2019s check if Varnish listens to port 80 and Apache2 to port 8080 properly. So, run the command:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ netstat -plunt<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"918\" height=\"734\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/8.png\" alt=\"Magento 2 Varnish Configuration 7\" class=\"wp-image-790\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/8.png 918w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/8-300x240.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/8-768x614.png 768w\" sizes=\"(max-width: 918px) 100vw, 918px\" \/><\/figure><\/div>\n\n\n\n<p>13. Now, it is time to check the results. View the browser response header and find the records:<\/p>\n\n\n\n<p><strong>Via: <\/strong>1.1 varnish-v4<br><strong>X-Varnish: <\/strong>32779<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"897\" height=\"651\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/41.png\" alt=\"Magento 2 Varnish Configuration - Browser response header\" class=\"wp-image-791\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/41.png 897w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/41-300x218.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/41-768x557.png 768w\" sizes=\"(max-width: 897px) 100vw, 897px\" \/><\/figure><\/div>\n\n\n\n<p>If the above-mentioned records are present, it means the page content is received from Varnish Cache. Also, you can check whether Varnish works properly with the help of Varnish logs by running the command:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ varnishlog<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"758\" height=\"480\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/92.png\" alt=\"Checking Varnish with Varnish logs\" class=\"wp-image-792\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/92.png 758w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/92-300x190.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/figure><\/div>\n\n\n\n<p><em>In case you want to make your online store faster and don\u2019t know how<\/em>,<em> check out the <\/em><a rel=\"nofollow\" href=\"\/learn\/magento-2-speed-optimization\"><em>Magento 2 Speed Optimization: Step-by-Step Instructions<\/em><\/a><em> <em>article<\/em><\/em> <em>for useful insights.&nbsp;<\/em><\/p>\n\n\n\n<h2>How to Set Up Magento 2 Varnish&nbsp;Easily&nbsp;<\/h2>\n\n\n\n<p>All in all, after the successful configuration of Varnish with Apache2, you are ready for Magento 2 Varnish setup. So, consider the following steps:<\/p>\n\n\n\n<h3>Step 1. Go to Magento 2 cache configurations<\/h3>\n\n\n\n<p>Go to Magento 2 cache configurations: <strong>Store &gt; Configuration &gt; System &gt; Full Page Cache<\/strong><\/p>\n\n\n\n<h3>Step 2. Set up Backend Host and Backend Port<\/h3>\n\n\n\n<p>Fill out Backend Host and Backend Port fields in accordance with your Varnish configurations. For example, if you performed all steps from this manual, your settings will look like the screen below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"1024\" height=\"691\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/10-1024x691-1.png\" alt=\"Magento 2 Varnish Configuration\" class=\"wp-image-793\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/10-1024x691-1.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/10-1024x691-1-300x202.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/10-1024x691-1-768x518.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>Press the <em>\u201cSave\u201d <\/em>button in the right corner.<\/p>\n\n\n\n<h3>Step 3. Export VCL for Varnish 4<\/h3>\n\n\n\n<p>Then, click <em>\u201cExport VCL for Varnish 4\u201d<\/em> for Varnish generation with your Magento 2 Varnish version.<\/p>\n\n\n\n<h3>Step 4. Replace the default Varnish configuration<\/h3>\n\n\n\n<p>After that, you should replace the default Varnish configuration <em>\/etc\/varnish\/default.vcl&nbsp;<\/em> with the configuration exported from your Magento 2 store. Run the following commands:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ cp \/etc\/varnish\/default.vcl \/etc\/varnish\/default.vcl.bak2\n$ mv &lt;download_directory>\/varnish.vcl default.vcl\n$ cp &lt;download_directory>\/default.vcl \/etc\/varnish\/default.vcl <\/code><\/pre><\/div>\n\n\n\n<h3>Step 5. Restart Varnish<\/h3>\n\n\n\n<p>Finally, restart Varnish with the command:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">$ sudo systemctl restart varnish.service<\/code><\/pre><\/div>\n\n\n\n<p>Now, your Magento 2 online store works with Varnish Cache. Just open your store in the browser and check the page headers using browser developer tools.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"700\" height=\"393\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/11.jpg\" alt=\"Magento 2 Varnish Configuration - Checking page headers\" class=\"wp-image-794\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/11.jpg 700w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/11-300x168.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p>As you can see, Magento 2 Varnish Cache configuration takes a lot of steps to complete a task. In order to avoid missing any details during the process, you can ask the Plumrocket team for professional help. So, <a rel=\"nofollow\" href=\"\/contacts\">get a quote to estimate the time and cost<\/a> of your Magento 2 Varnish implementation.<\/p>\n\n\n\n<h2>Wrapping Up&nbsp;<\/h2>\n\n\n\n<p>By and large, Varnish can provide a number of benefits for your Magento 2 online business starting from <a href=\"\/magento-performance-optimization\">improved website speed &amp; performance<\/a> to enhancing customer experience. Also, Varnish continues serving cached content to visitors even if your site is unresponsive. And if you ever run into any challenges or are short on time to configure Varnish and Magento in the right way, don\u2019t hesitate to contact the Plumrocket team of professionals.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Caching is the main part of any web server. With platforms like Magento 2, it is more important to install the cache for one essential reason. It can drastically reduce the load on your online store and speeds up the page response which improves user experience and enhances sales. Among the variety of cache options on today\u2019s market, Varnish is one of the most popular to consider. So, let\u2019s explore the importance of Magento 2 Varnish and find out the steps of its installation on your store.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[159,143],"tags":[153],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Configure Magento 2 Varnish in a Few Clicks - Magento Tutorials for Beginners &amp; Professionals<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/learn\/magento-2-varnish-configuration\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Configure Magento 2 Varnish in a Few Clicks - Magento Tutorials for Beginners &amp; Professionals\" \/>\n<meta property=\"og:description\" content=\"Caching is the main part of any web server. With platforms like Magento 2, it is more important to install the cache for one essential reason. It can drastically reduce the load on your online store and speeds up the page response which improves user experience and enhances sales. Among the variety of cache options on today\u2019s market, Varnish is one of the most popular to consider. So, let\u2019s explore the importance of Magento 2 Varnish and find out the steps of its installation on your store.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/learn\/magento-2-varnish-configuration\" \/>\n<meta property=\"og:site_name\" content=\"Magento Tutorials for Beginners &amp; Professionals\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-01T11:38:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-05T15:01:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2021\/08\/magento-2-varnish.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts\/777"}],"collection":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/comments?post=777"}],"version-history":[{"count":26,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts\/777\/revisions"}],"predecessor-version":[{"id":1237,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts\/777\/revisions\/1237"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/media?parent=777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/categories?post=777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/tags?post=777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}