Skip to content
super-page-cache

Instant speed boost – enable lazy-loading, defer scripts, and fine-tune caching for blazing-fast pages. Priority support included.

See Pro Plans β†’

WordPress Multisite (Subdomain Mode) Setup with Cloudflare ​

This guide explains how to set up and configure the Super Page Cache for Cloudflare plugin on a WordPress Multisite network using subdomain mode. You will learn how to install the plugin correctly, choose the right Cloudflare zone strategy, configure caching per subsite, and understand how cache purging works in a multisite environment.

Before You Begin ​

Make sure you have:

  • A WordPress Multisite network configured in subdomain mode (e.g., blog.example.com, shop.example.com)
  • The Super Page Cache for Cloudflare plugin installed on your network
  • A Cloudflare account with your domain added and DNS records configured
  • Cloudflare API credentials ready (API Token recommended)

πŸ“ Note: If you need help creating a Cloudflare account or adding your domain, see the Cloudflare account setup guide and adding a site to Cloudflare.

Installing the Plugin on Multisite ​

On a WordPress Multisite network, the Super Page Cache plugin should not be network-activated for automatic configuration of all subsites. Instead, activate and configure it individually on each subsite that needs Cloudflare caching.

Each subsite operates independently with its own:

  • Cloudflare API credentials
  • Zone ID selection
  • Cache settings and rules

To activate the plugin on a subsite:

  1. Go to the Network Admin β†’ Plugins page.
  2. Make sure the plugin is installed but not network-activated.
  3. Navigate to the WordPress admin dashboard of the subsite you want to configure (e.g., blog.example.com/wp-admin/).
  4. Go to Plugins and activate Super Page Cache for Cloudflare on that subsite.
  5. Repeat for each subsite that needs caching.

⚠️ Important: Do not use Network Activate β€” this does not auto-configure Cloudflare credentials or cache settings for each subsite. Each subsite must be set up individually.

Choosing a Cloudflare Zone Strategy ​

In a subdomain-based multisite, you need to decide how your Cloudflare zones are structured. There are two approaches, each with trade-offs:

Option A β€” Shared Parent Zone ​

All subsites share a single Cloudflare zone for the parent domain (e.g., example.com).

How it works:

  • One Cloudflare zone covers the parent domain and all *.example.com subdomains
  • Each subsite selects the same zone (example.com) during plugin setup
  • URL-specific cache purges are scoped to the exact URL and only affect that subsite

Advantages:

  • Simpler setup β€” only one Cloudflare zone to manage
  • Easier API token management β€” one zone covers everything
  • Less Cloudflare plan overhead

Disadvantage:

  • Using Purge All on any subsite clears the cache for the entire zone, affecting all subsites that share it

⚠️ Warning: If you use a shared zone, avoid using Purge All unless you intend to clear the cache for every subsite. URL-specific purges are not affected β€” they only clear the exact URLs requested.

Option B β€” Separate Zone per Subdomain ​

Each subdomain has its own dedicated Cloudflare zone (e.g., blog.example.com and shop.example.com are separate zones).

How it works:

  • Each subsite has its own Cloudflare zone
  • Each subsite selects its own zone during plugin setup
  • Cache purges (including Purge All) are fully isolated per subsite

Advantages:

  • Fully isolated cache purging β€” Purge All on one subsite does not affect others
  • Independent Cloudflare settings per subdomain

Disadvantages:

  • Requires creating and managing separate Cloudflare zones for each subdomain
  • Your API token must have access to all relevant zones
  • May require a higher Cloudflare plan depending on the number of zones

Comparison Table ​

FeatureShared Parent ZoneSeparate Zones per Subdomain
Setup complexitySimple β€” one zoneMore complex β€” one zone per subdomain
URL-specific purgesScoped to exact URL βœ…Scoped to exact URL βœ…
Purge All behaviorClears cache for all subsites ⚠️Clears cache for that subsite only βœ…
API token scopeOne zoneMust cover all zones
Cloudflare plan needsOne zone on your planMultiple zones on your plan

πŸ’‘ Tip: For most multisite setups, Option A (shared parent zone) is recommended because it is simpler to manage. Just be mindful of the Purge All behavior and prefer URL-specific purges when possible.

Configuring Each Subsite ​

After choosing your zone strategy, configure the plugin on each subsite individually. Repeat these steps for every subsite that needs Cloudflare caching.

  1. Log in to the WordPress admin dashboard of the subsite (e.g., blog.example.com/wp-admin/).
  2. Go to Settings β†’ Super Page Cache.
  3. Navigate to the Cloudflare tab.
  4. Select your Authentication Mode:
    • API Token (recommended) β€” a scoped token with limited permissions
    • API Key β€” your global Cloudflare API key plus your account email
  5. Enter your Cloudflare credentials and click Connect to Cloudflare.
  6. Select the correct Zone from the dropdown:
    • If using a shared parent zone, select your parent domain (e.g., example.com)
    • If using separate zones, select the zone matching this subsite's subdomain
  7. Enable Cloudflare CDN & Caching to activate edge caching.
  8. Configure any additional cache rules as needed (excluded URLs, excluded cookies, etc.).

πŸ“ Note: For details on creating an API Token with the correct permissions, see Super Page Cache Cloudflare Permissions. If using separate zones, your API token must have access to all relevant zones.

Verifying the Cache Is Working ​

After configuring a subsite, verify that caching is active:

  1. Click the Test Cache button inside the plugin on that subsite. A popup will show the results.
  2. Open the subsite in an Incognito/Private browser window.
  3. Press F12 to open Developer Tools and go to the Network tab.
  4. Refresh the page and click on the first request for your domain.
  5. Check the response headers for:
    • CF-Cache-Status: HIT β€” confirms Cloudflare is serving the cached page
    • x-wp-spc-disk-cache: HIT β€” confirms the local disk cache is working

Repeat this verification for each subsite you configure.

πŸ“ Note: The first visit after configuration may show CF-Cache-Status: MISS β€” this is normal. Refresh the page again to confirm it changes to HIT.

How Cache Purging Works in Multisite ​

Understanding cache purging behavior is important in a multisite environment:

  • URL-specific purges are always scoped to the exact URL and do not affect other subsites. When you update a post or page, only that specific URL is purged.
  • Purge All clears the entire Cloudflare zone. If subsites share a zone, this affects all of them.
  • There is no built-in cross-subsite or network-wide purge mechanism. Each subsite manages its own cache independently.

Best Practices for Cache Purging ​

  • Rely on automatic URL-specific purges when updating content β€” the plugin handles this per subsite.
  • Avoid using Purge All on shared zones unless you need to clear the cache for every subsite.
  • If you need full isolation for purging, consider using separate zones per subdomain (Option B).

The plugin automatically bypasses the cache for logged-in users by detecting standard WordPress authentication cookies (those starting with wordpress_logged_in_). This is covered by the default excluded cookie prefix wordpress in the plugin settings.

This works transparently across all subsites without any extra configuration β€” logged-in users on any subsite will always see fresh, uncached content.

Disk Cache Behavior in Multisite ​

The plugin stores disk cache files in separate directories based on each subsite's hostname:

/wp-content/wp-cloudflare-super-page-cache/blog.example.com/
/wp-content/wp-cloudflare-super-page-cache/shop.example.com/

This keeps the disk cache isolated between subsites automatically.

πŸ“ Note: On multisite installations, the plugin intentionally skips adding the WP_CACHE define to wp-config.php. This is expected behavior to avoid conflicts with the WordPress multisite bootstrap process β€” it is not a bug. The Cloudflare edge cache and the disk cache still function correctly without it.

Known Limitations ​

  • No network-wide settings panel β€” there is no centralized dashboard to manage cache settings across all subsites at once.
  • No cross-subsite cache coordination β€” each subsite manages its cache independently.
  • No network-wide purge β€” you cannot purge the cache for all subsites with a single action from the network admin.
  • API token scope β€” your Cloudflare API token must have access to all zones used by your subsites.

Setup Checklist ​

Use this checklist to make sure each subsite is configured correctly:

  • [ ] Plugin is not network-activated
  • [ ] Plugin is activated individually on the subsite
  • [ ] Cloudflare API credentials are entered on the subsite
  • [ ] Correct zone is selected from the dropdown
  • [ ] Cloudflare CDN & Caching is enabled
  • [ ] Cache test shows CF-Cache-Status: HIT in response headers
  • [ ] Content updates trigger URL-specific purges correctly

Repeat this checklist for every subsite in your multisite network.