MSCache Varnish Purge

MSCache Varnish Purge

Purge Varnish cache from the WordPress admin: automatic purge on content changes, exclusions, manual tools and full cache purge.

Compatible with WP 7
v1.0.0 Current Version v1.0.0
Updated 1 month ago Last Update on 15 Jun, 2026
Refreshed 6 hours ago Last Refreshed on
View on WordPress.org
Rank
#29,045
No change
Active Installs
1+
No change
KW Avg Position
49
-0.3 better
Downloads
104
+5 today
Support Resolved
0%
No change
Rating
20%
Review 1 out of 5
1 (0 reviews)

Next Milestone 10

Total Progress 60%
0+ 10+
28,247
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro

Unlock Exact Install Count

See the precise estimated active installs for this plugin, calculated from real-time ranking data.

  • Exact install estimates within tiers
  • Track install growth over time
  • Milestone progress predictions
Upgrade to Pro
Need 4 more installs to reach 10+

Rank Changes

27,593 28,319 29,045 29,771 30,497 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026
27,593 28,319 29,045 29,771 30,497 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026
27,593 28,319 29,045 29,771 30,497 17-06-2026 18-06-2026 19-06-2026 20-06-2026 21-06-2026 22-06-2026 23-06-2026 24-06-2026 25-06-2026 26-06-2026 27-06-2026 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026
27,593 28,319 29,045 29,771 30,497 18-04-2026 19-04-2026 20-04-2026 21-04-2026 22-04-2026 23-04-2026 24-04-2026 25-04-2026 26-04-2026 27-04-2026 28-04-2026 29-04-2026 30-04-2026 01-05-2026 02-05-2026 03-05-2026 04-05-2026 05-05-2026 06-05-2026 07-05-2026 08-05-2026 09-05-2026 10-05-2026 11-05-2026 12-05-2026 13-05-2026 14-05-2026 15-05-2026 16-05-2026 17-05-2026 18-05-2026 19-05-2026 20-05-2026 21-05-2026 22-05-2026 23-05-2026 24-05-2026 25-05-2026 26-05-2026 27-05-2026 28-05-2026 29-05-2026 30-05-2026 31-05-2026 01-06-2026 02-06-2026 03-06-2026 04-06-2026 05-06-2026 06-06-2026 07-06-2026 08-06-2026 09-06-2026 10-06-2026 11-06-2026 12-06-2026 13-06-2026 14-06-2026 15-06-2026 16-06-2026 17-06-2026 18-06-2026 19-06-2026 20-06-2026 21-06-2026 22-06-2026 23-06-2026 24-06-2026 25-06-2026 26-06-2026 27-06-2026 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026
Current #29,045
Change
Best #

Upgrade to Pro

Unlock 30-day and 90-day rank history charts with a Pro subscription.

Upgrade Now

Active Installs Growth

Active Installs 0,000,000+
Growth +0.0%
Peak 0,000,000

Downloads Growth

0 10 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026
0 10 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026
0 10 17-06-2026 18-06-2026 19-06-2026 20-06-2026 21-06-2026 22-06-2026 23-06-2026 24-06-2026 25-06-2026 26-06-2026 27-06-2026 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026
0 10 20 30 18-04-2026 21-04-2026 24-04-2026 27-04-2026 30-04-2026 03-05-2026 06-05-2026 09-05-2026 12-05-2026 15-05-2026 18-05-2026 21-05-2026 24-05-2026 27-05-2026 30-05-2026 02-06-2026 05-06-2026 08-06-2026 11-06-2026 14-06-2026 17-06-2026 20-06-2026 23-06-2026 26-06-2026 29-06-2026 02-07-2026 05-07-2026 08-07-2026 11-07-2026 14-07-2026 17-07-2026
0 10 20 30 17-07-2025 29-07-2025 10-08-2025 22-08-2025 03-09-2025 15-09-2025 27-09-2025 09-10-2025 21-10-2025 02-11-2025 14-11-2025 26-11-2025 08-12-2025 20-12-2025 01-01-2026 13-01-2026 25-01-2026 06-02-2026 18-02-2026 02-03-2026 14-03-2026 26-03-2026 07-04-2026 19-04-2026 01-05-2026 13-05-2026 25-05-2026 06-06-2026 18-06-2026 30-06-2026 12-07-2026 17-07-2026
Downloads
Growth
Peak

Upgrade to Pro

Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.

Upgrade Now

Reviews & Ratings

1.0
0 reviews
Overall 20%
5
0 (0%)
4
0 (0%)
3
0 (0%)
2
0 (0%)
1
0 (0%)

Tracked Keywords

Showing 3 of 3
Keyword Position Change Type Updated
varnish 27 Tag 1 day ago
reverse proxy 34 Tag 1 day ago
Purge 86 Tag 1 day ago

Unlock Keyword Analytics

Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.

  • Full keyword position tracking
  • Historical ranking data
  • Competitor keyword analysis
Upgrade to Pro

Track This Plugin

Get detailed analytics, keyword tracking, and position alerts delivered to your inbox.

Start Tracking Free

Plugin Details

Version
1.0.0
Last Updated
Jun 15, 2026
Requires WP
5.6+
Tested Up To
7
PHP Version
7.0 or higher

Support & Rating

Rating
★ ☆ ☆ ☆ ☆ 1
Reviews
0
Support Threads
0
Resolved
0%

Keywords

Upgrade to Pro

Unlock keyword rankings, search positions, and detailed analytics with a Pro subscription.

Upgrade Now

Frequently Asked Questions

Common questions about MSCache Varnish Purge

Your VCL must handle PURGE requests from the WordPress server and optionally support the ms-cache: excluded header for cache exclusions. Below is the reference VCL configuration tested and validated on the Managed Server infrastructure, for Varnish 3.x. Replace 123.123.123.123 with your server's public IP address and 127.0.0.2 with your actual backend address and port. vcl_recv — PURGE handling (single URL + full domain): ` backend website { .host = "127.0.0.2"; .port = "80"; } sub vcl_recv { Set X-Forwarded-For header if (req.http.x-forwarded-for) { set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; } else { set req.http.X-Forwarded-For = client.ip; } --------------------------------------------------------------- if (beresp.http.ms-cache == "excluded") { set beresp.ttl = 0s; set beresp.http.X-Cache = "EXCLUDED"; ... your other vcl_recv rules ... } **vcl_fetch — Respect the ms-cache: excluded header from the plugin:** sub vcl_fetch { unset beresp.http.ms-cache; return (hit_for_pass); } ... your other vcl_fetch rules ... } `
The plugin sends an HTTP PURGE request to Varnish via a raw TCP socket connection (fsockopen). The request includes the URL path to invalidate and the correct Host header for the domain. Single URL purge — When a post is saved, the plugin sends: PURGE /2026/04/03/my-post-title/ HTTP/1.0 Host: www.example.com Connection: Close The VCL uses ban() with a regex anchored match (^/path/$) to invalidate the URL. This approach is used instead of return(purge) because most production Varnish configurations include additional keys in vcl_hash (e.g., x-ua-device for mobile/desktop variants). A ban() invalidates all variants of the URL in a single operation, regardless of the hash. Full cache purge — When "Purge Entire Cache" is clicked, the plugin sends: PURGE /.* HTTP/1.0 Host: www.example.com Connection: Close The VCL interprets /.* as a regex matching all URLs for that host, effectively invalidating the entire domain cache. Asynchronous (fire-and-forget) — The socket is closed immediately after sending the request. The plugin does NOT wait for Varnish to respond, so the purge request does not block the WordPress request. In debug mode, the plugin reads the response status line for logging purposes.
PURGE (return(purge) in VCL) removes a single cached object matching an exact URL and hash. It is fast and frees memory immediately, but only works for the exact hash — if your vcl_hash includes device type, language, or other keys, you would need a separate PURGE for each variant. BAN (ban() in VCL) adds a rule to the ban list that retroactively invalidates all cached objects matching a condition. Objects are checked against the ban list when they are next requested. BAN is more flexible because it can match patterns (regex) and invalidates all variants of a URL regardless of the hash. This plugin uses the BAN mechanism (via the PURGE HTTP method) because it is the most reliable approach for production environments with multi-variant caching (mobile/desktop, multilingual, A/B testing, etc.).
When a frontend request path matches one of the exclusion patterns configured in the plugin settings (e.g., /cart/*, /checkout/*, /my-account/*), the plugin adds the HTTP response header ms-cache: excluded. This header does nothing by itself — it is a signal for your caching layer to skip caching for that response. In Varnish: The vcl_fetch block shown above checks for this header and sets beresp.ttl = 0s + return(hit_for_pass), ensuring the response is never stored in cache. In Nginx proxy cache: You can use this header with proxy_no_cache to achieve the same effect. See the Nginx integration section in the plugin documentation. WooCommerce pages (Cart, Checkout, My Account) can be automatically excluded without manual pattern configuration by enabling the "Auto-Exclude WooCommerce Pages" option in the WooCommerce tab.
Yes. The plugin fully supports WordPress Multisite with a dual-layer configuration: Network-level settings — Varnish IP, port, socket timeout, Cloudflare CDN integration, and third-party plugin integrations are configured once in Network Admin → Settings → MSCache Network and shared across all sites in the network. Per-site settings — Each site in the network has its own independent configuration for auto-purge options, exclusion patterns, WooCommerce integration, permissions, and debug mode. Dynamic host header — The plugin automatically detects and uses the correct domain name for each site when sending PURGE requests. Sites with custom domains (domain mapping) are supported. Network admin dashboard — Shows all sites in the network with their host headers and plugin status (enabled/disabled) at a glance. WP-CLI — The wp mscache purge-network command purges the cache for all sites in the network in a single operation, iterating through each site with the correct host header.
Yes. The plugin only opens outbound TCP connections to the configured Varnish IP (default: 127.0.0.1, localhost). It does not require any special PHP extensions beyond the standard fsockopen function available in all PHP installations. It is compatible with PHP 7.0 through PHP 8.x without deprecation warnings.
The WordPress HTTP API (wp_remote_request) sends the request and waits for the full HTTP response cycle before returning control to WordPress. This adds latency to every post save. Raw sockets with fsockopen allow the plugin to: Open a TCP connection to Varnish Write the PURGE request Close the connection immediately — without reading the response This "fire and forget" approach avoids waiting for the full HTTP response cycle on each purge, so the purge request does not block the WordPress admin request regardless of how long Varnish takes to process it. In debug mode, the plugin optionally reads the first response line (status code) for logging, which adds ~2-3ms but provides valuable diagnostic information.
The plugin integrates with: Cloudflare CDN — Synchronized cache purge via Cloudflare API v4 (per-URL or purge-everything) WP Rocket — Bidirectional sync (MSCache → WP Rocket and WP Rocket → MSCache) FlyingPress — Bidirectional sync W3 Total Cache — Sync purge (MSCache → W3TC) Autoptimize — CSS/JS cache clear on full Varnish purge Redis / Memcached Object Cache — Optional flush on full purge WooCommerce — Dedicated integration with stock, sales, reviews, coupons, attributes, orders, and auto-exclusion of dynamic pages Each integration is detailed below. Cloudflare CDN Integration Many websites use Cloudflare as a CDN and security layer in front of their origin server. When Varnish is purged, the content at the origin is fresh — but Cloudflare edge nodes around the world may still serve stale cached copies to visitors for hours or days. The plugin solves this by optionally sending purge requests to the Cloudflare API v4 every time Varnish is purged. Configuration requires a Cloudflare API Token (with "Zone.Cache Purge" permission) and the Zone ID of your domain, both available from the Cloudflare dashboard. Three purge modes are available: Per-URL — Each individual URL purged from Varnish is also purged from Cloudflare. Precise but generates more API calls. Cloudflare free plan allows 1,000 purge API calls per day. Purge Everything — Any Varnish purge event triggers a full Cloudflare cache purge. Simple but clears the entire CDN cache including static assets (CSS, JS, images). Per-URL + full purge fallback (recommended) — Individual page purges are sent per-URL to Cloudflare. Full Varnish purge events trigger a Cloudflare "purge everything". This mode balances per-URL precision with simplicity. A Test Connection button in the Cloudflare tab verifies that the API Token and Zone ID are valid and shows the zone name and status. WP Rocket Integration WP Rocket is one of the most popular WordPress performance plugins, providing page caching, file optimization, and lazy loading. When both MSCache and WP Rocket are active, two separate caching layers exist: Varnish (server-level) and WP Rocket (application-level). If only one is purged, visitors may see inconsistent content. The integration provides bidirectional synchronization: MSCache → WP Rocket — When MSCache purges a URL from Varnish, it also calls rocket_clean_post() to clear that page from WP Rocket's local page cache. On a full Varnish purge, rocket_clean_domain() clears the entire WP Rocket cache. WP Rocket → MSCache — When a user clicks "Clear Cache" in WP Rocket (or WP Rocket clears cache automatically), MSCache listens to the after_rocket_clean_domain, after_rocket_clean_post, and after_rocket_clean_home hooks and sends corresponding PURGE requests to Varnish. Important: WP Rocket has its own built-in Varnish add-on. If both the WP Rocket Varnish add-on and this MSCache integration are active simultaneously, you may get duplicate PURGE requests to Varnish. The plugin auto-detects this conflict and displays a warning in the Integrations tab. Disable WP Rocket's Varnish add-on when using MSCache. An infinite loop guard prevents MSCache → WP Rocket → MSCache → WP Rocket cycles. FlyingPress Integration FlyingPress is a lightweight WordPress performance plugin focused on page caching and CDN. The integration works similarly to WP Rocket: MSCache → FlyingPress — Calls FlyingPress\Purge::purge_url() for single pages and FlyingPress\Purge::purge_everything() for full cache purge. FlyingPress → MSCache — Listens to the flying_press_purge_everything action. When FlyingPress clears its cache, MSCache also sends a full PURGE to Varnish. The plugin auto-detects FlyingPress via FLYING_PRESS_VERSION constant or class existence and shows the detection status in the Integrations tab. W3 Total Cache Integration W3 Total Cache (W3TC) is a comprehensive performance plugin with page cache, database cache, object cache, and CDN support. The integration is one-directional (MSCache → W3TC):
Important: W3TC has its own Varnish module. If both the W3TC Varnish module and MSCache are active, you will get duplicate PURGE requests. The plugin auto-detects this conflict and warns you. Disable W3TC's Varnish module when using MSCache. Autoptimize Integration Autoptimize aggregates and minifies CSS and JavaScript files to reduce HTTP requests and file sizes. After a theme or plugin update, the optimized asset bundles may reference outdated code. The integration is one-directional and limited to full purge only:
Single page purges do not trigger Autoptimize clear, because regenerating all optimized assets for a single page change would be disproportionately expensive. This ensures that after major updates, both the Varnish cache and the Autoptimize asset cache are fresh and consistent. Redis / Memcached Object Cache Integration WordPress object cache (Redis, Memcached, APCu) stores transients, database query results, and rendered fragments in memory. When Varnish is fully purged (e.g., after a major site update), the object cache may still contain stale data that causes WordPress to render pages with outdated content — even though Varnish fetches fresh HTML from the backend. The integration is one-directional and limited to full purge only:

Sign In / Register

You need to sign in or register to use this feature.