You fix a typo in a headline, click Update, and open the page. The typo is still there. You purge the cache plugin. Still there. You open a private window. Still there. Twenty minutes later it fixes itself, and you never find out why.
The answer is almost always that your site has more than one cache, and only one of them was cleared. A modern WordPress site can have a page cache plugin, a reverse proxy such as Varnish, a managed host’s own server cache, and a CDN such as Cloudflare in front of all of it. Each layer keeps its own copy. Clearing the first one does nothing about the other three.
Lightify, the DaftPlug performance plugin, is built around that problem. Its documentation describes the purpose of its integrations in one sentence: when Lightify purges its cache, every other cache in front of your site needs to purge too. This guide covers how to purge Cloudflare cache from WordPress automatically, which other layers Lightify keeps in step, what you need to install for each, and how to handle the cases it cannot see.
Why one purge is not enough
Picture the path of a request. A visitor asks for a page. Cloudflare checks whether it has a copy. If not, the request reaches your host, where a server cache might answer. If not, it reaches WordPress, where the page cache answers. Only if every layer misses does PHP build the page.
When content changes, every layer that kept a copy is now wrong. Lightify’s troubleshooting guide gives the order to check when changes do not appear on the front end: purge Lightify, then your CDN, then your host’s cache. The point of the integrations is that you should not have to do that by hand after every edit.
Two facts make this manageable:
- The integrations have no settings. Each one checks whether the thing it integrates with is present, and hooks in if it is. There is nothing to enable or configure.
- They are all free. The documentation says every one of them is free, so this is not a Pro upsell.
What purges automatically
Before looking at the outer layers, know what Lightify itself clears. According to the cache documentation, publishing or editing a post clears that post and the pages that list it. The FAQ adds that this includes translations of the post and any page builder templates involved. You do not need to purge after publishing.
You do need to purge after changing plugin settings, since existing cached pages were built under the old configuration. The same applies after activating a license, because several Pro optimizations default to on.
Every purge, automatic or manual, fires Lightify’s purge actions, and that is what the integrations listen to.
Layer by layer
Cloudflare
Lightify detects Cloudflare through the official Cloudflare plugin. When Lightify purges, Cloudflare’s cache is purged for the same URLs.
The catch is credentials. If you use Cloudflare without the official plugin, Lightify has nothing to purge with. The docs give two options: install the plugin, or purge Cloudflare manually after content changes. For any site where editors publish without thinking about caches, install the plugin.
One more Cloudflare note from the FAQ: turn off Rocket Loader if you use it. It reorders script execution and fights with Lightify’s defer and delay JavaScript features.
Varnish
Varnish is detected from the X-Varnish response header, then purged with PURGE requests. That covers the common setup where Varnish sits on the same server and adds its header to responses.
Detection can be wrong, for example when Varnish is on another host or a proxy strips the header. Two filters handle that:
add_filter('lightify_varnish_enabled', '__return_true');
add_filter('lightify_varnish_server', function () {
return 'https://10.0.0.5';
});
The first forces the integration on. The second points purge requests at the Varnish server address.
Managed hosts
Most managed WordPress hosts run their own server-level cache. Lightify detects and purges these, according to the integrations guide:
- Kinsta
- WP Engine
- SiteGround
- Cloudways with Breeze
- RunCloud
- SpinupWP
- GridPane
- Rocket.net
- WordPress.com edge cache
- Sites using Nginx Helper
Each integration is guarded and wrapped, so a host changing its API breaks that one integration rather than your purges.
A question that comes up constantly: should you turn off the host cache to avoid conflicts? The docs say no. Running Lightify’s page cache alongside a host cache is normal and correct. Lightify caches the HTML, the host caches at the edge, and the integration keeps them in step. You do not need to disable one.
What you should not do is run two caching plugins. The FAQ explains that two plugins writing advanced-cache.php will fight, and which one serves a given request becomes unpredictable. A host cache is a different layer. A second cache plugin is the same layer twice.
The purges people forget
The outer layers are only half the story. The other half is knowing which pages a change affects. A product edit or a template change can touch pages you did not edit. Lightify’s integrations cover several of those cases.
Translations
WPML, Polylang, TranslatePress, and Weglot are detected, and purging a post purges every translation of it. Editing the English version clears the French copy at the same time. Without this, a multilingual site routinely shows corrected English and outdated everything else.
Page builder templates
Saving a template purges the whole page cache, because a template change affects every page using it rather than only the post you edited. The docs list Elementor, Divi, Bricks, Oxygen, Beaver Builder, Breakdance, Brizy, and Gutenberg templates as covered, and Elementor’s CSS regeneration is hooked separately.
If you build with a custom template post type, add it:
add_filter('lightify_page_builder_template_post_types', function ($postTypes) {
$postTypes[] = 'my_custom_template';
return $postTypes;
});
ACF options pages
Saving an ACF options page purges everything, since options pages can affect any template. A header phone number or a footer notice stored in options is exactly the kind of change that otherwise stays stale for days.
WooCommerce stock
The WooCommerce integration has two jobs. Cart, checkout, and account pages are excluded from caching automatically. And when a product’s stock changes, the pages showing that product are purged, so a sold-out item does not keep showing as available from a cached page.
Multi-currency
Aelia, YITH, and Curcy set a currency cookie, which is already part of Lightify’s cache key, so the correct variant is served without help. WCML keeps the currency in the session rather than a cookie, so Lightify sets one for it. Without that, everyone would be served whichever currency the page was first cached in.
Pretty Links and BuddyBoss
Pretty Links redirect URLs are excluded from caching, so a cached page cannot serve a stale redirect. On BuddyBoss, private-network mode blocks REST routes for logged-out visitors, which would break Lightify’s own endpoints, so the integration allows them through.
Manual purges, and which one to use
Manual purges live in the admin bar on any page. The four controls do different things:
| Control | Effect |
|---|---|
| Purge current page | Rebuilds just the page you are viewing |
| Purge cache and preload | Clears everything, then warms it again |
| Purge pages and preload | Clears the page cache only |
| Purge everything and preload | Clears all caches, including optimized assets |
Use Purge current page when one page looks wrong. Use Purge everything and preload after any settings change, because optimized CSS, JavaScript, and images generated under the old settings are otherwise kept.
The “and preload” part matters. After a purge, preloading visits your pages in the background, on a delay between requests so it does not overwhelm your server, so the first real visitor gets a cached copy rather than paying to build it. We cover how that works in more depth in our guide to warming the WordPress page cache from your sitemap.
Purge from a deploy script
If you deploy theme or plugin changes from Git or a CI pipeline, a manual purge is easy to forget. Lightify’s REST API exposes the purge controls as endpoints, and the docs call them the exception worth knowing about, because they are genuinely useful from a deploy script.
For a script running outside a browser session, use a WordPress application password. The user needs manage_options, which is administrator-level access, so the docs recommend a dedicated user rather than your own account, and revoking the password when the pipeline changes hands:
curl -X POST https://example.com/wp-json/lightify/v1/purge-everything-and-preload \
-u "deploy:xxxx xxxx xxxx xxxx xxxx xxxx"
Each endpoint fires the matching purge actions, so integrations propagate to Cloudflare, Varnish, and your host at the same time. Calling it at the end of a deploy is, in the docs’ words, the cleanest way to avoid serving stale pages after a release.
When your cache layer is not on the list
A CDN or proxy that Lightify does not detect can still be kept in step, using the purge actions. There are eight, one :before and :after pair per purge type: lightify_purge_url, lightify_purge_urls, lightify_purge_pages, and lightify_purge_everything. Use :before to purge an external cache at the same time:
add_action('lightify_purge_urls:before', function ($urls) {
my_cdn_purge($urls);
});
add_action('lightify_purge_everything:before', function () {
my_cdn_purge_all();
});
Three filters cover the rest:
lightify_auto_purge_urlsadds URLs to an automatic purge. The docs’ example adds/sitemap.xmlso editing anything also clears the sitemap.lightify_is_cacheablerefuses to cache a page.lightify_preload_urlschanges what preloading visits.
When it still looks stale
If a change still does not show after a purge, work through it in this order.
- Check the page is cached by Lightify at all. The overview page shows cache status. On Apache without
mod_headers, thex-lightify-cacheheader is silently skipped even though caching works, so look for files underwp-content/cache/lightify/before concluding anything is broken. - Check the outer layers. Is the official Cloudflare plugin installed? Is Varnish on another host? Purge Lightify, then the CDN, then the host cache.
- Check whether it is only you. If the stale page only appears in your browser, it may be the browser’s service worker cache. Unregister it under Application > Service Workers in developer tools, or lower the browser cache expiration. If Progressify is active, it owns the service worker and Lightify’s browser cache section shows as handled by it, since two service workers on the same scope would conflict.
Free and Pro
Every integration in this article is free, as are the page cache, automatic purging, the admin bar controls, and preloading. Pro adds optimizations such as Remove Unused CSS, Delay JavaScript, Lazy Render Elements, and automatic WebP conversion, and it comes with the DaftPlug membership: one license unlocks Lightify along with Progressify, Generatify, Rankify, and Snapshotify. Plans differ only by site count and are on the pricing page.
Quick checklist
- List every cache layer in front of your site: Lightify, Varnish, host, CDN.
- Install the official Cloudflare plugin if you use Cloudflare.
- Keep the host cache on. Do not run a second cache plugin.
- Add the Varnish filters if Varnish is on another server.
- Register custom template post types with the page builder filter.
- Use Purge everything and preload after settings changes.
- Call the purge endpoint at the end of deploys.
- Hook the purge actions for any CDN Lightify does not detect.
A cache is only fast if it is right. Once every layer clears together, you can stop opening private windows to check whether your own edits went live.


