Skip to main content

How to Use Breeze Cloudflare Integration for Cache Purging

Learn how to use Breeze Cloudflare Integration for cache purging to keep your WordPress site updated, & always serving fresh content to all.

Written by Syed Abuzar Mehdi

If your WordPress site uses Cloudflare CDN, the Breeze plugin can help you clear cached files directly from your WordPress dashboard.

This ensures that your visitors always see the latest content, without having to log in to Cloudflare every time you make a change.

In this article, you’ll learn how Breeze integrates with Cloudflare, how to enable this feature, and how it works behind the scenes.


Table of Contents:


How to Use Breeze Cloudflare Integration for Cache Purging?

The Cloudflare integration in Breeze allows you to automatically or manually purge CDN cache when you update your WordPress content.

This helps ensure your visitors always see the most up-to-date version of your site without delays.

CDN

Breeze offers support for Content Delivery Networks (CDN). Instead of using the CDN providers' plugins, you can use Breeze to integrate your CDN. Here's how you can integrate one.

Breeze supports Cloudflare Enterprise and offers 1-click integration and you don’t require any special configuration within Breeze for it to work. However, if you want to use your own CDN you can follow this guide.

Varnish

Breeze offerings include Varnish Cache configuration to make your website robust. You don't require any modification here as all the settings are pre-configured.

  1. Auto Purge Varnish — We recommend that you keep this option enabled at all times to automatically purge Varnish cache on actions like publishing new blog posts, pages, and comments.

  2. Varnish Server — This is the default pre-installed Varnish server IP address of Cloudways servers.

  3. Purge Varnish Cache — You can also manually purge the entire cache instantly by pressing this button.

Finally, click Save Changes.

How to Use Breeze Cloudflare Integration to Purge CDN Cache Automatically?

The Breeze Cloudflare integration allows you to purge cache (i.e., remove outdated files) from Cloudflare’s edge servers whenever your site content changes, like when you update a post, page, or switch themes.

This ensures your visitors always get the freshest version of your site.

Step 1: Enable Cloudflare Cache Purge in wp-config.php

To activate the Cloudflare options in Breeze, you must first define two constants in your wp-config.php file:

define( 'CDN_SITE_ID', 'YOUR_SITE_ID_HERE' );

define( 'CDN_SITE_TOKEN', 'YOUR_SITE_TOKEN_HERE' );

These values are used to authenticate and connect with the Breeze Cloudflare microservice.

If these values are not defined, the Breeze plugin will not show Cloudflare options, and cache purging won’t work.

Step 2: Define Environment for Cloudflare Endpoint

Breeze also needs to know which Cloudflare microservice URL to use. This is controlled through a third value:

getenv( 'FPC_ENV' )

This environment variable helps Breeze determine which platform you’re on — Flexible (FP) or Autoscale (FMP) — and selects the correct purge endpoint.

If CDN_SITE_ID, CDN_SITE_TOKEN, and FPC_ENV are not properly defined, the Cloudflare module will remain disabled in Breeze.

What Happens When Cache is Purged?

Once configured, Breeze can purge Cloudflare cache in two ways:

Automatically:

  • When you switch themes, Breeze automatically purges the entire Cloudflare cache.

Manually or on demand:

  • When you update posts, pages, or custom post types

  • When you click "Purge CF Cache" in the Breeze UI (if implemented)

How Breeze Talks to Cloudflare (Behind the Scenes)

Breeze uses the following helper functions and endpoints to communicate with Cloudflare's microservice:

Helper Functions:

  • reset_all_cache() – Purges cache for the entire domain (or all subsites in a multisite).

  • purge_cloudflare_cache_urls() – Clears cache for specific URLs (like posts or pages).

Endpoints:

  • purge-fpc-domain – Clears cache for the whole domain.

  • purge-fpc-sub-dir – Clears cache for a sub-site (in a multisite with subfolders).

  • purge-fpc-url – Clears cache for specific URLs.

Enable Debug Mode for Cloudflare Cache Logs (Optional)

For developers or advanced users, Breeze provides a debug mode to check Cloudflare cache purge requests.

To enable debug logging, add the following line to wp-config.php:

define( 'BREEZE_CF_DEBUG', true );

Once enabled, Breeze will log Cloudflare-related actions so you can troubleshoot any issues.

What Data Is Sent When Cache Is Cleared?

When Breeze sends a request to Cloudflare, it includes the following information:

$data_to_send = array(
$data_to_send = array(
'urls' => <URLs list to purge>,
'appToken' => CDN_SITE_TOKEN,
'appId' => CDN_SITE_ID,
'platform' => ‘fp or fmp’,
);

This ensures that only the correct files are purged from Cloudflare — no manual work needed.

Breeze Cloudflare Integration Only Works with Cloudways Cloudflare Enterprise

The built-in Cloudflare cache purging feature in the Breeze plugin is designed specifically for the Cloudways Cloudflare Enterprise integration.

It does not support manually connecting a personal or third-party Cloudflare account using a Cloudflare Zone ID or API Token.

If you attempt to use your own Cloudflare credentials, you may encounter the following error:

“Cloudflare microservices base url not found”

Why This Happens

The following Breeze constants:

  • CDN_SITE_ID

  • CDN_SITE_TOKEN

are not Cloudflare Zone ID or API Token values.

These values are internally used by Breeze to communicate with the Cloudways Cloudflare purge microservice. They are automatically configured as part of the Cloudways Cloudflare Enterprise integration.

Breeze also requires:

  • A Cloudways-hosted application environment

  • The FPC_ENV environment variable configured by Cloudways infrastructure

This environment variable is automatically provisioned when the Cloudflare Enterprise add-on is properly enabled on your application. It cannot be manually configured through the wp-config.php file.

If the required environment variable is missing, Breeze cannot communicate with the Cloudways purge service, which results in the following error:

“Cloudflare microservices base url not found”

Important:

The Breeze Cloudflare integration will only work when:

  • Your application is hosted on Cloudways

  • Cloudways Cloudflare Enterprise is enabled and fully provisioned on the application

Using personal Cloudflare account credentials with this Breeze feature is currently not supported.

Alternative Option for Personal Cloudflare Accounts

If you want to purge cache for your own non-Cloudways Cloudflare account directly from WordPress, you should use a dedicated Cloudflare plugin that supports custom Cloudflare credentials, such as:

  • Cloudflare Official WordPress Plugin

  • Other WordPress plugins that support custom Zone ID and API Token configuration

Troubleshooting

If Cloudways Cloudflare Enterprise is already enabled but cache purging is still not working:

  • Enable Breeze debug logging using BREEZE_CF_DEBUG

  • Verify whether the FPC_ENV environment variable is properly configured on the server

If the variable is empty or missing, the Cloudflare Enterprise integration may not be fully provisioned for the application.

In this case, contact Cloudways Support for further assistance.


That’s it! We hope this article was helpful.

Need Help?

If you need assistance, feel free to:

We're here 24/7 to help you!

Did this answer your question?