Let your content team refresh live pages without a Cloudflare login
Pick the pages you just updated, push the new version live in seconds, and keep a full record of who refreshed what.
Build me a publish and purge desk: an internal app that lets our content and marketing team clear the cached version of pages they just updated, without giving any of them a Cloudflare dashboard login. The audience is non-technical, so every piece of copy in the app should talk about pages, posts and images rather than edge caches, zones or CDNs. Refreshing individual page addresses is the default and safest path, so make that the prominent action everywhere.
The main view is a list of recently published and updated posts, loaded from WordPress with List Posts filtered by status and modified date. Default to published posts modified in the last 14 days, newest first, with a control to widen the window and a search box. Each row shows the post title, the author, how long ago it was modified, and the live URL, with a checkbox on the left. Use the author information embedded in the posts response where it is available and fall back to the author id when it is not. A Refresh selected pages button takes the checked rows and clears exactly those URLs using Purge Cache by URL. Note that our catalog only exposes posts for WordPress, so scope this panel to posts and let the manual panel below cover images, landing pages and anything else.
A second panel accepts addresses pasted by hand, one per line, and also accepts a bare hostname or a path prefix for people who want to clear a whole section. For hostname and prefix requests, use Purge Cache by Tag, Host, or Prefix. That operation is Enterprise-only on Cloudflare, so if the plan rejects it do not surface a raw error. Fall back to expanding the request into individual address purges through Purge Cache by URL where you can, and say plainly that clearing a whole section is not available on this plan and that they should paste specific page addresses instead.
The app has to work out which Cloudflare zone each address belongs to so that nobody using it has to know what a zone is. On load, call List Zones to get the zones the API token can see, then match each address hostname against the zone names, with the longest matching suffix winning. When a hostname does not map to a zone name directly, for example a subdomain or a vanity host, call List DNS Records for the candidate zones and match against the record names. Hold the resolved mapping in app state for the session so you are not re-resolving on every purge. If an address cannot be matched to any zone, leave it out of the batch and list it under a short heading such as: we could not match these addresses to a site you have access to.
Refreshing an entire site sits behind a guarded confirm and uses Purge All Cache. The dialog makes the person choose the site, type a reason into a free text field, with the confirm button staying disabled until that reason is filled in, and read a warning that explains in plain terms that clearing everything means every page has to be rebuilt from our own server for a while, which can slow the site down for visitors, so it should only be used after a site wide or theme level change. Visually de-emphasize this action and mark it as a last resort. Store the typed reason on the history record.
Every purge, successful or not, writes a row to a history table stored in the app's own database: who ran it, when, the type of refresh (selected posts, pasted addresses, hostname or prefix, or everything), the addresses or target involved, the site name, the typed reason where there is one, and whether Cloudflare accepted it including the failure reason when it did not. The history view is filterable by person and by date range and shows newest first. This is the record engineering will look at when someone asks why a page changed.
After each purge, post one short line to a web ops Slack channel using the Slack Bot Send a Message operation, for example: Jess refreshed 3 pages on example.com, accepted by Cloudflare. Keep it to a single line covering who did it, how many pages, which site, and the outcome. Let the channel be set in a small settings area. If the Slack post fails, still record the purge in history and do not block the person using the app.
Handle Cloudflare's limits properly rather than leaking errors. Cloudflare caps how many addresses one purge request can carry and how many requests a token can make in a window, so send addresses in batches of up to 30 per request, run the batches one after another, and if Cloudflare returns a rate limit response, pause and retry the remaining batches instead of failing the whole run. Never show a raw API error. Show progress in plain language, such as: Cloudflare is busy right now, we have refreshed 12 of 30 pages and are still going. Finish with a plain summary of how many pages were refreshed and how many did not go through, with a retry option for the failures.
What does this prompt do?
- Lists the posts your team just published or edited, so someone can tick the three pages they touched and refresh only those
- Takes pasted addresses, a whole section of the site, or a single image, and works out which of your sites each one belongs to automatically
- Keeps a history of every refresh: who ran it, which pages were cleared, and whether it went through, filterable by person and date
- Posts a one line note to your web ops Slack channel each time, so engineering has an audit trail without being in the loop
What do I need to use this?
- A Cloudflare account, and an API token for the sites you want to refresh. Your content team never needs a Cloudflare login of their own
- A WordPress site, so the app can show the posts your team recently published or updated
- A Slack workspace, and a channel where the short audit notes should land
How can I customize it?
- Change how far back the recent posts list reaches, and which post statuses it shows
- Point the audit notes at a different Slack channel, or reword the line that gets posted
- Decide who is allowed to see the refresh everything button, and how much explanation they have to type first
FAQs
Why does my page still show the old version after I updated it?
Do my content and marketing team need their own Cloudflare logins?
Is it safe to refresh the entire site?
Will this work on my Cloudflare plan?
Can I see who refreshed what, and when?
Related templates
Stage a batch of filings overnight, then approve each completed form from a screenshot before anything is ever submitted.
Pick a client and a date range to see sent, replies, meetings booked and the real deal value your cold email produced, campaign by campaign.
Review every conversation Fin closed as resolved, judge which ones actually stuck, and see what the gap is worth against your bill.
Merge your IT, HR and Facilities queues into one list ranked by SLA time left, then reply, change status and escalate without ever opening Jira.
See every page's translation status at a glance, edit translations side by side with the English, and publish only what your team has actually approved.
One place for sales and ops to request an NDA or vendor agreement, watch its status, and let legal launch the contract in a single click.
Stop pinging engineering to clear the cache
Give your content and marketing team a safe, self-serve way to push updates live, with a full audit trail behind it.