The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
626 Ready
464 Need Help
🏆 Leaderboard
Actively Maintained v1.0.1

Taurus Varnish Config

taurus-media/module-varnish-config

Automatically keeps Varnish configuration current by downloading a remote VCL template on a daily cron, processing it through Magento native VclGenerator placeholder substitution, and loading the result into the running Varnish instance via varnishadm. Also provides a CLI command for deployment pipelines.

309
Downloads
Below average
0
GitHub Stars
2mo ago
Last Release
0
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
13 warnings
L3 PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.0.1 on Magento 2.4.9
Jun 7, 2026
v1.0.0 on Magento 2.4.9
Jun 1, 2026

Share This Module's Status

Taurus Varnish Config Magento compatibility status badge

README

Loaded from GitHub

Taurus_VarnishConfig

A Magento 2 module that automatically keeps your Varnish configuration up to date by downloading a remote VCL template, processing it with Magento's native placeholder substitution, and applying it to the running Varnish instance.

How it works

  1. A cron job runs once a day
  2. The VCL template is downloaded from a configured URL
  3. Magento's built-in VclGenerator replaces all standard placeholders with live values from the store configuration (backend host/port, access list, grace period, SSL offload header, design exceptions)
  4. The processed VCL is saved to var/tmp/varnish_extended.vcl
  5. The new configuration is loaded and activated via varnishadm:
    varnishadm vcl.load magento2 <file>
    varnishadm vcl.use magento2
    

NOTE: vcl.load and vcl.use commands are not flushing the already cached pages.

Requirements

  • Magento 2 with Magento_PageCache module
  • PHP 8.1+
  • varnishadm available in the system PATH of the user running Magento cron

Installation

composer require taurus-media/module-varnish-config
bin/magento module:enable Taurus_VarnishConfig
bin/magento setup:upgrade

CLI command

The VCL update can also be triggered manually:

bin/magento taurus:varnish:update-vcl

This runs the same logic as the cron job and exits with code 0 on success or 1 on failure, making it suitable for use in deployment pipelines.

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.