Skip to Content

WordPress, combined purge of Cloudflare + SpinupWP caches

Created on
No updates
Approx ~5 minutes reading time for 1,022 words.

Introduction

Caching is one of those things we all rely on, whether we love it or not. It keeps modern websites fast and efficient, but clearing multiple caches can sometimes feel like jumping through hoops.

This article introduces the Webreact integration for SpinupWP and Cloudflare plugin that links two services so that when you purge a site or specific URL in SpinupWP, the matching cache in Cloudflare is cleared automatically.

Prerequisites

Before getting started, make sure you have the following:

  • A site managed through SpinupWP, with the official SpinupWP WordPress plugin active. This ensures WordPress can trigger purge events.
  • A Cloudflare account with your domain added as a zone, plus your API key or token and the Zone ID for that domain.

Finding Cloudflare Zone ID and setting API Token / Key

Zone ID

  1. Log in to your Cloudflare dashboard.
  2. Select the domain you’re working on.
  3. On the Overview page, look to the right-hand side (or near the bottom on smaller screens) for the panel showing your Zone ID (see example image below.)

This ID links the plugin to the correct domain.

Setting API Token / Key

Just below the Zone ID, you’ll find a link labelled “Get your API token.” Follow this to create an API token or key. Cloudflare will only show it once, so be sure to store it somewhere safe. A secure note in a password manager like 1Password is ideal.

Cloudflare Zone ID with link to generate API Token / Key
Cloudflare Zone ID with link to generate API Token / Key

Connecting WordPress to Cloudflare

Once active, you connect to Cloudflare via the settings screen.

  1. In wp‑admin, go to Settings > SpinupWP Cloudflare.
  2. Enter your Cloudflare API key or token, along with the Zone ID you gathered earlier.
  3. Save your changes.

How automatic purging works

With the credentials confirmed and SpinupWP active, the plugin handles cache clearing for you:

  • Full-site or global purges in SpinupWP trigger a full Cloudflare purge for the matching domain.
  • Single-URL purges in SpinupWP send targeted URL purges to Cloudflare instead of wiping the entire cache.

This keeps your server cache and Cloudflare’s edge cache nicely in sync with no manual scripts or webhook juggling required.

Using the Admin Bar purge option

Sometimes you’ve made a quick change and need it live straight away. For those moments, there’s a handy manual option:

SpinupWP cache dropdown showing new 'Purge Cloudflare Cache' option
SpinupWP cache dropdown showing new 'Purge Cloudflare Cache' option
  1. While logged in, visit the front end of your site.
  2. Click on the Cache Admin Bar menu item.
  3. Look for the SpinupWP Cloudflare purge options.

This gives you reliable “just clear it now” functionality right where you need it.

Final thoughts

Managing multiple caches across multiple sites can easily become repetitive and time-consuming. This plugin streamlines the whole process, saving you time and reducing the chance of missing a cache somewhere along the way.

A big thanks to the team at Webreact for creating such a helpful tool!

// End of Article

Article Information

Dave A.K.A. 'barrd'

Dave is a Bristol based Scottish Expat who has 20+ years experience of web development. Loves playing guitar, reading books, watching Sci-Fi and tinkering with tech.

About Dave A.K.A. 'barrd'

Image for Dave A.K.A. 'barrd'
Dave is a Bristol based Scottish Expat who has 20+ years experience of web development. Loves playing guitar, reading books, watching Sci-Fi and tinkering with tech.

Read more about Dave