Cloudflare keeps copies of your site’s files on its servers around the world. That makes your site fast. But when you change something, Cloudflare can keep showing the old copy for some time.
Softminal Cache solves this. Once you connect Cloudflare, every time the plugin clears a page, Cloudflare clears the same page. You never have to log in to Cloudflare and click Purge by hand again.
What you need
- A site that is on Cloudflare (your domain uses Cloudflare’s name servers).
- Softminal Cache 1.1 or newer.
- A Cloudflare API token. We will make one in the first step.
Step 1: make an API token in Cloudflare
An API token lets the plugin do only what you allow, and only on your site. It is safer than your Global API Key, which the plugin does not accept.
- Log in to Cloudflare and open My Profile, then API Tokens.
- Click Create Token, then Create Custom Token.
- Give it a name, like “Softminal Cache”.
- Under Permissions, add two rows: Zone, Cache Purge, Purge and Zone, Zone, Read.
- Under Zone Resources, choose Include, Specific zone and pick your domain.
- Click Continue to summary, then Create Token, and copy the token. Cloudflare shows it only once.
Step 2: connect it in Softminal Cache
- In WordPress, open Softminal Cache and go to the Cache tab.
- Click CDN and Cloudflare.
- In the Cloudflare and Varnish card, paste the token and click Connect.
The plugin finds your domain on Cloudflare and shows “Connected to yourdomain.com”. The switch “Clear Cloudflare with this cache” is now on. The token is stored encrypted and is never shown again, not even in the settings export.
Step 3: check that it works
Edit any post and click Update. Then reload the Cache tab. Under the switch you will see when Cloudflare was last cleared and how many addresses were sent. In Cloudflare, the purge also shows in your audit log.
What gets cleared, and when
- You update a post: only the changed pages are cleared on Cloudflare, like the post, your homepage and its categories.
- You click Purge, or save settings: everything on Cloudflare is cleared.
- All the addresses of one change go to Cloudflare in one go, at the end of the request, so your admin stays fast.
Keep the token in wp-config.php instead
If you prefer, you can put the token in your wp-config.php file. Then it is never saved in the database. Add this line above “That’s all, stop editing!”:
define( 'SOFTMINAL_CACHE_CLOUDFLARE_TOKEN', 'your-token-here' );
The card then says it uses the token from wp-config.php, and there is no Disconnect button. To stop, remove the line.
Do I also need the CDN address?
No. Cloudflare already serves your files from your own domain, so leave the CDN address empty. The CDN card is for pull zone CDNs that give you a separate address, like cdn.yourdomain.com.
Using Varnish too?
Some hosts run Varnish in front of the site. If yours does, turn on Clear Varnish with this cache in the same card. Leave the address empty to use your site’s own address, or enter host and port, like 127.0.0.1:6081. If you do not know, ask your host. Most sites do not need this.
If something is not right
- “Cloudflare did not accept this token”: the token was not copied whole, has expired, or is missing a permission from Step 1.
- The card asks you to connect again: the security keys in your wp-config.php changed, so the saved token cannot be read any more. Paste the token again.
- The card names another plugin: the official Cloudflare plugin, or another purge plugin, also clears Cloudflare. Let one of them do it, not both.
- On a multisite network: only a network admin can use a token set in wp-config.php. When a site admin clicks Purge, only that site’s pages are cleared.
Not using Softminal Cache yet? It is free, with no Pro version.
If you have any question or face any problem, please do write to us at support.softminal.com. Our team reads every message.

Leave a Reply