Runbook: Cache Purge
When to Purge
- After deploying CSS/JS changes
- When published content is not appearing on the live site
- After changing site-wide settings (menus, widgets, ACF options)
- After bulk content updates
Purge Order
Always purge from innermost to outermost layer:
1. WordPress (WP Rocket) → 2. Varnish → 3. CloudflareStep 1: Purge WP Rocket
Via Admin
- WordPress Admin → WP Rocket → Dashboard
- Click "Clear Cache"
Via WP-CLI (if available)
bash
wp rocket clean --confirmStep 2: Purge Varnish
Purge Specific URL
bash
# SSH into Varnish server
varnishadm -T localhost:6082 -S /etc/varnish/secret "ban req.url ~ ^/the-specific-path"Purge Everything
bash
varnishadm -T localhost:6082 -S /etc/varnish/secret "ban req.url ~ ."Verify Varnish Status
bash
# Check backend health
varnishadm -T localhost:6082 -S /etc/varnish/secret "backend.list"
# Monitor cache hits in real-time
varnishlog -g raw -i Backend_healthStep 3: Purge Cloudflare
Via Plugin (Preferred)
The dezeen-cloudflare-purge-manager plugin automatically purges on post publish. Check the plugin's log page for status.
Via Cloudflare Dashboard
- Log into Cloudflare Dashboard
- Select dezeen.com zone
- Caching → Configuration → Purge Everything
- Or: Custom Purge → Enter specific URLs
Via Cloudflare API
bash
curl -X POST "https://api.cloudflare.com/client/v4/zones/{ZONE_ID}/purge_cache" \
-H "Authorization: Bearer {API_TOKEN}" \
-H "Content-Type: application/json" \
--data '{"purge_everything": true}'Step 4: Verify
bash
# Check Cloudflare cache status
curl -I https://www.dezeen.com/ | grep -i cf-cache-status
# Should show MISS on first request, then HIT
# Check Varnish
curl -I https://www.dezeen.com/ | grep -i x-varnish
# Check page content is fresh
curl -s https://www.dezeen.com/ | head -50Purging Static Assets Only
If only CSS/JS changed:
- Cloudflare → Custom Purge → Enter asset URLs:
https://static.dezeen.com/d/assets/css/style-min.csshttps://static.dezeen.com/d/assets/js/min/scripts-min.js
- Or purge by prefix:
https://static.dezeen.com/d/assets/
Gotchas
- Browser cache: Users may have old assets cached locally. The
DZN_TEMPLATE_VERSIONconstant provides cache-busting. Update it after asset changes. - Cloudflare edge cache: Even after purging, some edge nodes may take 30–60 seconds to clear.
- Varnish probe delay: After maintenance mode, nodes take 5–15 seconds to come back online (probe interval × window).
- WP Rocket and Varnish overlap: Both cache full pages. Purge both to ensure consistency.