From the blog

How to clear the Bunny CDN cache automatically in WordPress

Guide: clear the Bunny CDN cache automatically with Softminal Cache

Bunny CDN keeps copies of your images, CSS and JavaScript on servers around the world. Visitors get them from a server near them, so your site loads faster.

But when you change a file, Bunny can keep the old copy. Softminal Cache can now clear Bunny for you, every time it clears its own cache.

Before you start

You need a Bunny account and a pull zone for your site. A pull zone is Bunny’s copy of your site’s files. When you create it in bunny.net, use your site’s address as the Origin URL. For example https://example.com.

Step 1: Copy your Bunny API key

In bunny.net, open Account settings, then API key. Copy the key.

This key can manage your whole Bunny account. So Softminal Cache stores it encrypted, never shows it again, and uses it only to find your pull zone and clear it.

Step 2: Connect

  1. Open Softminal Cache, then the Cache tab.
  2. Go to CDN, Cloudflare and Bunny.
  3. In the Cloudflare, Bunny and Varnish card, find Bunny CDN.
  4. Paste the key under API key and click Connect.

Softminal Cache finds the pull zone for your site by itself. Do several pull zones use your site? Then it asks you to choose one.

Step 3: Clear Bunny with the cache

Clear Bunny with this cache is on by default. Now, when you click Purge, or Softminal Cache clears everything, your pull zone is cleared too.

When you update one post, only that page is cleared, and Bunny is left alone. This is on purpose. Bunny holds your files, not your pages.

Step 4 (optional): Use Bunny as your CDN

Not using a CDN yet? Click Use as my CDN. Your images, CSS and JavaScript now load from the pull zone address. You can undo it any time with Undo in the top bar.

Already use another CDN address? Use as my CDN replaces it.

Check that it works

Click Clear them now. The card shows the time and the result of the last clear. If something went wrong, it says what.

More details are in the docs: Bunny CDN and CDN.

If you have any question or face any problem, please do write to us at support.softminal.com. Our team reads every message.

Make your site faster today.

Page cache, file optimisation, images, database cleanup and a speed audit in one plugin. Every feature is free, and you can undo any change.

Join the conversation

Have a question or an idea? Please share it below. Our team reads and replies to every comment.

Leave a Reply

Your email address will not be published. Required fields are marked *