Linux 软件免费装
Banner图

Nahnu Cache Connector for Bunny.net

开发者 ja1me4
Ja1me4
更新时间 2026年11月9日 23:34
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

cache cdn purge waf bunny cdn

下载

1.0.10 1.0.7 1.0.11 1.0.0.1 1.0.5 1.0.6 1.0.8 1.0.9 1.0.0.4 1.0.0.5 1.0.1 1.0.0 1.0.2 1.0.0.3 1.0.3 1.0.4 1.0.0.0 1.0.0.2 1.0.12 1.0.13 1.0.14 1.0.15

详情介绍:

Nahnu Cache Connector for Bunny.net connects your WordPress site to Bunny.net CDN. It mirrors every cache purge to Bunny, deploys a complete set of production-ready edge rules for you and keeps them current, makes Bunny Shield WAF safe to run on WordPress, and shows live CDN stats in your admin. Full documentation: wpbunnyconnector.com. Highlights Automatic cache purge sync Hooks into your cache plugin so every purge is mirrored to Bunny CDN. Per-URL purges are used where the cache plugin supports them, instead of wiping the whole zone. Purges triggered during one request (post saves, plugin, theme and core updates, cache plugin clears) are combined into one Bunny API call at the end of the request, after your local cache has finished clearing. Supported cache plugins (18): Edge rules that look after themselves One click deploys a complete set of rules to your Bunny pull zone: HTTPS redirect, HTML caching for visitors, admin and logged-in bypasses, ecommerce, membership, LMS and booking bypasses, long browser caching for assets, query string handling, CORS for fonts, Shield WAF exceptions and security headers. Rules are tracked by GUID, so redeploying never creates duplicates, and rules you created yourself in the Bunny dashboard are left alone. You do not have to remember to redeploy: Bunny Shield WAF, without locking yourself out Bunny Shield is a powerful WAF, but WordPress admin screens, the block editor and page builders send requests that WAF rules often flag. This plugin turns Shield off for those areas for your team only, and keeps inspecting everyone else. Security headers Sets the six response headers that securityheaders.com grades on, at the Bunny edge, so they apply to cached pages too: Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, Referrer-Policy and Permissions-Policy. The defaults are safe for any WordPress site. HSTS is set for one year without includeSubDomains or preload, and the Content-Security-Policy restricts framing and plugins without blocking the inline scripts WordPress and most themes rely on. Developers can replace any value with the wpbc_security_headers filter. Remote management: MainWP, ManageWP, InfiniteWP, WP Umbrella, Modular DS, Watchful and UpdraftCentral Putting Bunny in front of sites you manage from a dashboard can cause slow syncs, sites reported as disconnected, and long updates that run twice. The plugin fixes this for every major remote management service: MainWP extras. On the MainWP Dashboard, requests to child sites running this plugin go straight to their origin server, skipping the CDN, its WAF and its 60 second limit. Each origin is checked before use and rechecked weekly, and sites that cannot be reached directly keep using the CDN. The Integrations tab shows each child's status plus server cron and timeout recommendations. WP Umbrella extras. Umbrella's login protection is given Bunny's edge server list, so it sees each visitor's real IP instead of a Bunny server, and Bunny is purged whenever Umbrella clears caches. Works with Nahnu Login Shield Nahnu Login Shield is our free login security plugin. It locks out brute-force attackers and can push their IPs to the Bunny.net WAF, so they are blocked at the CDN edge before they ever reach your server. It reuses this plugin's Bunny connection, so there is nothing extra to set up. Its status and a one-click install are at the top of the Integrations tab. Ready for WordPress 7.1 WordPress 7.1 processes images in the browser using about 13 MB of WebAssembly and JavaScript. Bunny Optimizer is kept off those files, and Shield is turned off for them for your team, so image uploads in the block editor work with Shield and Optimizer active. These rules deploy only on WordPress 7.1 and later. Ecommerce bypass Bypass rules are built automatically from each plugin's own page settings. No manual URL entry needed. Supported ecommerce and donation plugins (6): Membership bypass Supported membership plugins (13): LMS and community bypass Supported LMS plugins (9): Affiliate and community plugins with bypass rules (2): Booking and event bypass Supported booking and event plugins (4): Multilingual support When WPML, Polylang or TranslatePress is active, bypass rules include translated page URLs automatically, and the pull zone varies its cache by Accept-Language so each visitor gets the right language. Cache warmer After a full purge, a background job crawls your sitemap to pre-warm the CDN edge. It requests one page at a time, at most two sites warm at once on the same server, and it waits while the server is busy, so warming never competes with real visitors. Supported SEO plugins for sitemap auto-detection: Live CDN analytics Pull zone stats, DNS stats, bandwidth breakdown, cache hit rate, Shield WAF events and cache sync status, all inside WordPress admin. Perma-Cache cleanup Deletes stale Perma-Cache files from Bunny Storage right after a full purge, without waiting for them to expire. Automation: WP-CLI, REST API and PHP hooks The API tab in the plugin shows every endpoint, filter and action with copy-paste examples. Checked, no integration needed These plugins were analysed and confirmed fully compatible with no bypass rules required: For the full compatibility list visit wpbunnyconnector.com. Developer hooks Other plugins can integrate without any changes to this plugin. Filters Actions Full developer documentation and examples: wpbunnyconnector.com. External services This plugin connects to the Bunny.net API (api.bunny.net) to purge cache, manage edge rules and pull zone settings, and retrieve statistics, and to Bunny Storage when Perma-Cache cleanup is enabled. When WP Umbrella is active, it also downloads Bunny's public edge server IP list (api.bunny.net/system/edgeserverlist) once a week; no key or site data is sent with that request. On a MainWP Dashboard, it checks whether each child site's own origin server answers directly; those requests only go to your own sites. An active Bunny.net account and API key are required. No visitor data is sent. See the Bunny.net Privacy Policy and Terms of Service. Disclaimer This is an independent third-party tool. It is not affiliated with, endorsed by, or sponsored by Bunny.net.

安装:

  1. Install from Plugins > Add New by searching for "Nahnu Cache Connector", or upload the nahnu-cache-connector-bunny-net folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins menu.
  3. Go to Settings > Bunny Connector.
  4. Paste your Bunny.net Account API Key and click Test. The key is saved as soon as Bunny accepts it.
  5. Pick your pull zone from the searchable list.
  6. Open the Edge Rules tab and click Save & deploy.
Your API key is the Account API Key found in the Bunny.net dashboard under Account > API, not a pull zone access key. Full setup instructions: wpbunnyconnector.com. Defining constants (optional) Lock any value in wp-config.php so it is not stored in, or changed through, the database. When a constant is defined, the matching field is hidden in the settings screen. define( 'WPBC_API_KEY', 'your-bunny-api-key' ); define( 'WPBC_PULL_ZONE_ID', '123456' ); define( 'WPBC_DNS_ZONE_ID', '789012' ); define( 'WPBC_PERMA_ZONE_NAME', 'your-storage-zone' ); define( 'WPBC_PERMA_ZONE_PASSWORD', 'storage-zone-password' ); define( 'WPBC_PERMA_REGION', 'de' ); Available values for WPBC_PERMA_REGION: de (Falkenstein), uk (London), ny (New York), la (Los Angeles), sg (Singapore), se (Stockholm), br (Sao Paulo), syd (Sydney), jh (Johannesburg).

屏幕截图:

  • Settings tab: cache warmer and Perma-Cache cleanup configuration
  • Settings tab: Cache-Control mode and WAF bypass roles
  • Settings tab: purge triggers and post types to watch
  • Settings tab: Bunny API connection and wp-config.php constants
  • Stats tab: live CDN analytics, DNS stats and cache sync status
  • Manual Purge tab: full purge and per-URL purge with wildcard support
  • Stats tab: cache hit rate, bandwidth, requests and cache sync status detail

升级注意事项:

1.0.15 Fixes the "Bypass: POST requests" edge rule, which checked the query string instead of the request method. Edge rules update automatically after updating. 1.0.14 Adds a second pull zone for www and non-www on separate zones, fixes rules on www sites never matching the non-www address, and cuts server load after updates: one purge once updates finish, and a gentler cache warmer. Edge rules update automatically after updating. 1.0.13 Fixes sites going down for up to 10 minutes after a long theme update from MainWP or another dashboard. Updates now always finish, even when the CDN cuts the connection at 60 seconds. 1.0.12 Adds ManageWP, InfiniteWP, WP Umbrella, Modular DS, Watchful and UpdraftCentral support, ends CPU spikes during bulk updates, and fixes a crash on PHP 8.0 and 8.1. Edge rules update automatically after updating. 1.0.11 Security headers: adds Strict-Transport-Security and a Content-Security-Policy at the edge, the full set securityheaders.com grades on. Edge rules redeploy automatically after updating. 1.0.10 MainWP: faster, more reliable syncs. Also fixes CPU spikes and a stuck "edge rules update pending" notice after a failed automatic deploy. Edge rules redeploy automatically after updating. Sync your MainWP sites once afterwards. 1.0.9 Fixes a fatal error on the settings page that stopped data from loading and the tabs from working after an automatic edge rule deploy. 1.0.8 Adds edge protection for the plugin's own admin files, tab links that work without JavaScript, and a diagnostic banner on the settings page. Edge rules redeploy automatically after updating. 1.0.7 Support for WordPress 7.1 client-side media processing: image uploads in the block editor no longer fail with Bunny Shield or Optimizer active. Edge rules redeploy automatically after updating. 1.0.6 Fixes "Could not load code editor" in the Bricks code element when Bunny Shield is active. Edge rules redeploy automatically after updating. 1.0.5 Security fix for the Shield WAF bypass cookie. Edge rules redeploy automatically and admins get the new cookie on their next admin page load. The bypass now defaults to Administrator and Editor instead of all roles.

常见问题:

Does this work with any cache plugin?

It integrates with the 18 cache plugins listed above. Without one of them you can still use the edge rules, manual purge, admin bar button, CDN stats and the post save and update purge triggers. Purges just are not mirrored from a cache plugin.

My site uses www and non-www on two pull zones. Does that work?

Yes. Pick the second pull zone under Settings, Second pull zone (optional), or define WPBC_PULL_ZONE_ID_2 in wp-config.php. Both zones then get the same edge rules, and every purge clears both. If one pull zone already lists both hostnames, or one hostname redirects to the other before it reaches Bunny, you do not need a second zone. The settings screen tells you which case applies once your zones are loaded.

Do I need to redeploy edge rules after updating the plugin?

No. Rules redeploy automatically in the background after every update, reinstall or activation, and a five-minute check catches anything missed. You can still deploy manually from the Edge Rules tab at any time, and a manual deploy always takes priority.

Do the ecommerce, membership and LMS bypass rules deploy automatically?

Yes. Each bypass rule checks for its plugin at deploy time. If WooCommerce is not active, the WooCommerce rules are skipped. When a supported plugin is activated or deactivated, rules redeploy in the background.

Does it work with WPML, Polylang or TranslatePress?

Yes. Bypass rules include translated page URLs, and the pull zone varies its cache by Accept-Language.

How does the Shield WAF bypass work, and is it safe?

When someone with a selected role logs in or opens an admin page, the plugin sets a cookie holding a secret that is unique to your site. Edge rules turn Shield off only for requests carrying that exact value, and only for admin, logged-in REST, builder and media processing URLs. Visitors are always inspected. You can choose the roles in Settings (Administrator and Editor by default) and rotate the secret at any time.

Will this get an A on securityheaders.com?

It sets all six headers the scanner grades on. Test both your www and non-www addresses after the rules deploy. If your site needs a stricter Content-Security-Policy, or HSTS with includeSubDomains and preload, set it with the wpbc_security_headers filter.

Does it work with MainWP?

Yes, on both the dashboard and child sites. Child sites trust the dashboard's IP in Shield automatically, the dashboard can reach child sites directly at their origin, and pull zones never resend timed-out MainWP requests. For best results use a real server cron on the dashboard and set MainWP's child request timeout to at least 300 seconds. The Integrations tab shows the status for each site.

Does it work with ManageWP, InfiniteWP, WP Umbrella, Modular DS, Watchful or UpdraftCentral?

Yes. Each dashboard's IP is trusted in Shield after its first verified request, its login links are never cached, and long updates are not cut short or sent twice. If a dashboard is blocked before its first request gets through, add its IP once under Settings, in the Shield WAF trusted IP whitelist. UpdraftCentral sends commands from your browser by default, so the IP it learns is yours and expires after 7 days.

I updated the plugin on many sites at once. Why did some redeploy a few minutes later?

To avoid a CPU spike on servers that host many sites. Updates pushed from a dashboard, by WordPress auto-updates or by WP-CLI give each site its own fixed slot of up to 5 minutes, and at most two sites on one server deploy at once. Updates you click in a site's own admin deploy straight away. Developers can change the window with the wpbc_stagger_window filter and the per-server limit with wpbc_server_deploy_slots.

Why does the purge after an update happen a minute or two later?

So the site is purged once, after all the updates have finished, instead of after every single plugin or theme. A dashboard update usually arrives as several separate requests, and each one used to empty the CDN, so the server rebuilt every page several times. Updates pushed from a dashboard also wait for the site's own slot, so the sites on one server do not all purge in the same minute. Updates to admin-only plugins (this plugin, remote management connectors, backup plugins) do not purge at all. Developers can change the wait with the wpbc_update_purge_delay filter and the skipped plugins with wpbc_no_purge_plugin_folders.

The Bricks code editor or WordPress 7.1 image uploads fail with Shield on. What do I do?

Both are covered by edge rules since versions 1.0.6 and 1.0.7. Update the plugin and the rules redeploy automatically. If an Author or another role uploads media, add that role to the WAF bypass roles in Settings.

What is Force Cache mode?

Some cache plugins send Cache-Control: max-age=0 to Bunny, which tells Bunny not to cache. Force Cache mode overrides this on your pull zone so Bunny caches HTML for the TTL you set, whatever the origin sends.

Can I use this with Bunny Perma-Cache?

Yes. Enable Perma-Cache cleanup in Settings and enter your Bunny Storage zone details. After every full purge the plugin deletes stale Perma-Cache files so visitors always get fresh content.

Where do I find my Bunny API key?

In the Bunny.net dashboard, go to Account > API and use the Account API Key, not a pull zone access key. The account key is needed to manage edge rules and list pull zones.

Why do some rules show (1/6) or (2/6) in the name?

Bunny allows 5 URL patterns per rule trigger. Rules that cover many paths or file types are split into batches of 5, and each batch is a separate rule. The suffix shows which batch you are looking at.

Why is the rule count in Bunny higher than 75?

Batched rules each take several slots, and some rules are added only when a matching plugin is active. On a site with www and non-www hostnames and several integrations, the count in Bunny is higher. The plugin tracks every rule and cleans up old batches when it redeploys.

Why are LMS course and lesson pages not bypassed?

Most LMS plugins publish courses and lessons as normal public pages that are safe to cache. Only per-user pages (student dashboards, checkout, registration, account) need a bypass, and the plugin makes this distinction for each LMS.

Is this compatible with security plugins like Wordfence or AIOS?

Yes. Security plugins work at the request or firewall layer and are fully compatible. See the Integrations tab for the complete list.

Will NitroPack work alongside this plugin?

Not as a CDN. NitroPack runs its own CDN, and using NitroPack CDN and Bunny CDN together creates a double-CDN conflict.

Can my plugin integrate with Nahnu Cache Connector for Bunny.net?

Yes. See the Developer hooks section above and the API tab inside the plugin for filters, actions, REST endpoints and examples.

My plugin is not listed. Can you add it?

Yes. Visit wpbunnyconnector.com/support to request a plugin check.

How is the API key stored? Is it secure?

The API key is stored in the WordPress options table, or in wp-config.php if you define it there. It is never printed in the page, never sent to the browser and never included in an AJAX response. It is only sent in request headers to the Bunny.net API. Every admin action requires a valid nonce and the manage_options capability.

更新日志:

1.0.15 1.0.14 1.0.13 1.0.12 1.0.11 1.0.10 1.0.9 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0.5 1.0.0.4 1.0.0.3 1.0.0.2 1.0.0.1 1.0.0.0