Purge the whole page cache after a site-wide change

MaintenanceIntermediate~3 min

Before you start

Plugin version 1.13.0 or newer, and a supported page cache plugin serving cached pages. Enable Cache status and Purge the whole page cache on the Abilities tab; both start off and need a user who can manage options. The whole-site purge is marked destructive. It is refused on a multisite network.

Some changes reach every page at once: a new menu item, a footer link, a theme setting. Purging one page at a time would take all day and burn through the purge budget. One whole-site purge is the right tool, as long as you know what it costs.

This prompt reads the budget and cooldown first, tells you what will be emptied, and runs the purge only after you say yes.

The prompt
I changed [the main menu] and it shows on every page, so the whole page cache
needs clearing.
Read the cache status first. Tell me which cache plugins are serving cached
pages, whether a whole-site purge is allowed right now or how long until it is,
and how much of the purge budget is left. Name any cache in front of the site
you can see in the headers.
Then tell me in one line what a whole-site purge will empty, and remind me the
site runs slower until pages are cached again. Wait for my yes.
After I confirm, purge the whole page cache once. Report each plugin's result
and reason, the summary, and the budget left. If a CDN or host cache sits in
front and no cache plugin passes the purge on to it, tell me to clear it myself.

Why this is safe to run

The status read comes first and changes nothing, so you see the cooldown and the budget before anything is emptied. The purge itself is allowed once every 15 minutes for the whole site, and a refused call spends no budget. A filter can tune the budget but cannot switch it off. Your cache plugin’s own screen stays unlimited if you need it.

This plugin purges no CDN, Cloudflare, Varnish or host cache itself. Proxy Cache Purge, Nginx Helper, SiteGround Speed Optimizer, W3 Total Cache and WP Fastest Cache can pass the purge on to one they are set up for. LiteSpeed Cache, W3 Total Cache and Proxy Cache Purge never confirm a removal, so expect requested from them. For a single page, clear the page cache after an agent edit is cheaper.

Already connected? Ask your agent for the “purge the whole page cache after a site-wide change” recipe, or tell it what you changed site-wide.

How it works

  1. Read the cache status, including when a whole-site purge is next allowed and how much budget is left.
  2. Say which cache plugins will be emptied and that the site is slower until pages are cached again.
  3. Wait for you to confirm.
  4. Run one whole-site purge.
  5. Report each plugin's result and the budget that remains.

Questions

How often can the whole cache be purged?
Once every 15 minutes for the whole site, across every connection. It also costs 10 units of the shared purge budget, which by default allows 30 units in any 10 minutes. Cache status gives the seconds left before the next whole-site purge is allowed.
Does it clear the object cache too?
No. It empties the page cache of each supported plugin that is serving cached pages. The object cache is left alone, and some plugins remove related files with their pages, such as SpeedyCache's critical CSS.