Automatically invalidate your Cloudflare CDN cache whenever your Lynkow content changes, so visitors always see the latest version of your site.

Why This Plugin?

If you put your site behind Cloudflare, visitors are served from Cloudflare's edge cache. Without this plugin, that cache can stay stale for minutes or hours after you publish new content.

The Cloudflare Cache Purge plugin solves this by automatically clearing your Cloudflare cache whenever you update something in Lynkow. No server to host, no code to write, no manual purging.

Prerequisites

Before installing the plugin, you need:

  • A Cloudflare account with at least one zone (a domain pointing to Cloudflare nameservers)

  • Admin access to your Lynkow site

  • 2 minutes to create an API token

You do not need a paid Cloudflare plan. The Free tier is supported.

Step 1 — Create a Cloudflare API Token

The plugin needs a Cloudflare API token with permission to purge cache. We recommend creating a dedicated token scoped to only the purge permission.

  1. Open https://dash.cloudflare.com/profile/api-tokens while logged into Cloudflare

  2. Click "Create Token"

  3. Scroll to the bottom and click "Get started" on the "Create Custom Token" row

  4. Configure the token:

    • Token name : Lynkow Cache Purge

    • Permissions : add one row with these three columns

      • Column 1: Zone

      • Column 2: Cache Purge

      • Column 3: Purge

    • Zone Resources : set to

      • IncludeAll zones from an account → select your Cloudflare account

    • Client IP Address Filtering : leave empty (optional)

    • TTL : leave as default (no expiration)

  5. Click "Continue to summary", verify the permissions, then click "Create Token"

  6. Copy the token immediately — Cloudflare only shows it once. If you lose it, you will need to delete it and create a new one.

The resulting token has only the Cache Purge permission and access to all zones in your Cloudflare account. It cannot read or modify anything else.

Step 2 — Install the Plugin in Lynkow

  1. In your Lynkow admin dashboard, open the Plugins page from the left sidebar

  2. In the "Available" section, find the Cloudflare Cache Purge plugin and click Install

  3. A three-step drawer opens on the right side of the screen.

Step 2.1 — Choose Events

The first step lets you select which types of changes should trigger a cache purge. Sensible defaults are pre-selected.

Common event groups:

  • content — articles created, updated, published, deleted

  • site_block — page layouts, global blocks

  • category — category changes

  • tag — tag changes

  • review — when a review is moderated and appears on a page

  • redirect — when URL redirects change

  • variable — when template variables are updated

Select only the events that actually affect cached pages on your site. If you are not sure, leave the defaults.

Click Next.

Step 2.2 — Paste the API Token

Paste the Cloudflare API token you created in Step 1 into the API Token field.

Click Next.

The plugin verifies the token with Cloudflare and loads the list of zones it has access to. If the token is invalid, you will see an error and remain on this step.

Step 2.3 — Pick Zone and Strategy

  • Zone : a dropdown with all the Cloudflare zones the token has access to. Select the zone that serves your site.

  • Stratégie de purge (Purge strategy) :

    • Par préfixe (recommandé) : Smart purge. Only the URLs affected by each change are cleared from the cache. Fast and efficient.

    • Purge complète : The entire cache for the zone is cleared on every change. Use this if you prefer a simpler mental model or if targeted purges miss some pages on your site.

  • Domaine personnalisé (Custom domain) : Optional. Click Ajouter if your Cloudflare zone uses a different domain than the one configured in Lynkow (for example, www.example.com vs example.com). Leave it empty otherwise.

Click Install to save.

The plugin now appears in the "Installed" section with a green status dot.

Step 3 — Verify It Works

Test the plugin without touching your actual content:

  1. On the installed plugin row, hover to reveal the action buttons

  2. Click the test tube icon (Test)

  3. A toast message appears:

    • Success : the plugin was able to call Cloudflare. You are done.

    • Error : the message tells you what went wrong. The most common cause is an expired or revoked API token.

You can also click the file icon to see the execution history with:

  • Event name

  • Success/error status

  • Execution duration

  • Timestamp

This is the best place to debug unexpected behavior.

Strategy Comparison

Strategy

Cache impact

Recommended for

Par préfixe

Only affected pages are cleared

Most sites — fast and efficient

Purge complète

Entire zone cache is cleared

Complex sites where targeted purges miss pages

Start with Par préfixe. If you notice stale content after updates, switch to Purge complète.

Troubleshooting

"Zone ID ou API Token invalide"

Cloudflare returned an error when the plugin tried to verify your credentials. Check that:

  • The token has not expired or been revoked

  • The token has the Zone.Cache Purge permission

  • The token has access to at least one zone

Create a new token if in doubt and update the plugin settings.

Plugin logs show success but my cache is still stale

Cloudflare cache purge takes a few seconds to propagate across edge servers. If content is still stale after 30 seconds:

  1. Check the plugin logs to see what was purged

  2. If the page you are testing is not visibly there, switch to the "Purge complète" strategy

Rate-limit errors

Cloudflare rate-limits the purge API. If you are saving many pieces of content in quick succession, you may hit this limit. Temporarily disable the plugin during bulk operations (toggle it off, do your work, toggle it back on).

Security

Your Cloudflare API token is encrypted at rest and masked in the admin UI after saving (shown as ••••a3f2). It is never exposed in API responses or logs.

Uninstall

To remove the plugin:

  1. Open the Plugins page

  2. Hover over the Cloudflare Cache Purge row in the "Installed" section

  3. Click the trash icon

  4. Confirm in the dialog

Uninstalling deletes all plugin settings and execution history. Your Cloudflare token remains valid — delete it from the Cloudflare dashboard if you no longer need it.