Varnish WordPress | AdminGeekZ | varnish cache,wordpress cache


This is a plugin for wordpress to intergrate the varnish cache for high performance websites.

This plugin will purge the cache on,

  • Post changes (new, edit, trash, delete).
  • Page changes (add, edit, remove)
  • Comment changes (add, edit, approve, unapprove, spam, trash, delete)
  • Theme changes


At present some of the features are,

  • Multiple varnish backends
  • Manually purge the cache
  • Enable/Disable Feed Purging
  • Ability to purge entire cache on changes
  • Debug logging
  • Minimize number of purges and remove duplicate purges for speed on larger installations
  • Supports varnish 4 + 5
  • Support for Woocommerce


Our tests show that by utilizing varnish you gain a ~70x capacity increase over standard WordPress making you resistant to traffic floods (slashdot, digg, reddit, stumbleupon).


To install the WordPress plugin.

  1. Get the latest version from
  2. Copy the varnish-wordpress folder to wp-content/plugins/
  3. Login to wp-admin
  4. Go to Plugins->Installed Plugins on the left menu
  5. Under “Varnish WordPress” click “Activate”
  6. You should now see the varnish menu under “Settings”

To install the varnish VCL.

  1. Copy the file “default.vcl” provided with this plugin to your varnish installation path (/etc/varnish/default.vcl on most systems)
  2. Configure the backend in the default.vcl to point to the ip and port your webserver(s) are running on
  3. Restart varnish

To configure the WordPress plugin

  1. In the varnish backends box input the backends we need to access to purge the cache. (Format: ip:port)
  2. Check the enabled box
  3. Click Save

The setup should be complete. You can enable Debug Logging temporarily to monitor what the plugin is doing. Test by enabling debug logging and adding a new post.

Plugin author


Plugin official website address
If you encounter problems in using the Varnish WordPress plugin, you can comment below, and I will try my best to help you solve the problem

Leave a Comment

Your email address will not be published.