Search Over 30,000 FREE Plugins from the Official WordPress Plugin Directory Repository

Purge Varnish Cache

Automate purge Varnish cache when post content on your site is created or modified and also allow you to purge Varnish cache manually.

Purge Varnish Cache provides integration between your WordPress site and multiple Varnish Cache servers. Purge Varnish Cache sends a PURGE request to the URL of a page or post every time when post content is created or modified. This occurs when editing, publishing, commenting or deleting an post item, menu items, front page and when changing themes. Varnish is a web application accelerator also known as a caching HTTP reverse proxy.


  • Minimum configuration.
  • admin-socket integration and Varnish admin interface for status etc.
  • Unlimited number of Varnish Cache servers
  • Configurable actions upon events that will expire URLs from varnish cache like reverse proxy caches.
    • The front page.
    • The post/page created/updated/status changed.
    • Any categories or tags associated with the page.
    • The menu created/updated.
    • Changing theme.
  • Purge multiple URLs manually from Varnish cache.
  • Purge whole site cache manually.
  • Debugging.

Requirements: Apache sockets module/extention should be enabled.

Purpose: The main purpose of developing this plugin is to deliver updated copy of content to end user without any delay.

Enhancement Request: For any further enhancement, please mail me at

Author DP Singh
Contributors devavi
Tags automatic, cache, caching, fast, flush, performance, plugin, purge, speed, varnish, wp-cache
  1. purge-varnish screenshot 1

    Terminal settings screen for test connectivity from varnish server.

  2. purge-varnish screenshot 2

    Action trigger configuration screen to make automate purge varnish cache for post expiration.

  3. purge-varnish screenshot 3

    Action trigger configuration screen to make automate purge varnish cache for comment expiration.

  4. purge-varnish screenshot 4

    Action trigger configuration screen to make automate purge varnish cache on menu update.

  5. purge-varnish screenshot 5

    Action trigger configuration screen to make automate purge varnish cache on theme change.

  6. purge-varnish screenshot 6

    Purge whole site cache.

  7. purge-varnish screenshot 7

    Purge URLs screen to purge urls manually from varnish cache.

How to install Purge Varnish?

  • Go to your admin area and select Plugins -> Add new from the menu.
  • Search for "Purge Varnish" or download
  • Click install.
  • Click activate.

How to configure settings?

  • Access the link DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-settings and configure terminal settings.
  • Access the link DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-expire and configure required actions and events.
  • Access the link DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-urls for purge urls from varnish cache.
  • Access the link DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-all to purge all varnish cache.


Enable expire configuration automatically when plug in enabled. Add more tags. Update screens.

Version 2.x

  • PHP 4.x/5.x compatibility.

How can I check everything's working?

It is not difficult. You should install this pluing and configure varnish terminal setting by accessing the link: DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-settings. If you have the status 'Varnish running' means everything iss working perfectly!

What versions of Varnish is supported?

it is supported all varnish versions of 3.x and 4.x

How do I manually purge a single URL from varnish cache?

Click the 'Purge URLs' link or access the link DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-urls. This interface allow you to purge 1 to 7 urls.

What if I have multiple varnish Servers/IPs?

You need to configure multiple IPs in Varnish Control Terminal textfield in 'Terminal' screen like

How can I debug?

You need to add this constant define('WP_VARNISH_PURGE_DEBUG', true); in wp-config.php file. It will generate the log file 'purge_varnish_log.txt' inside uploads directory.

How do I manually purge the whole site cache?

Click on link 'Purge all' or access the link: DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-all and Click on 'Purge All' button.

What it purge?

Basically by default it purge nothing. It allow you to decide and configure expire setting. So you no need to worry. Click on 'Expire' link or access the link: DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-expire to configure purge expire setting.

Version 2.0

Requires WordPress version: 4.0 or higher

Compatible up to: 4.7.2

Last Updated 05 Jan 2017

Date Added: 01 Nov 2016


5 stars
3 ratings


Not Enough Data

Works: 0
Broken: 0