| 开发者 | digitalpoint |
|---|---|
| 更新时间 | 2026年2月18日 08:00 |
| 捐献地址: | 去捐款 |
| PHP版本: | 5.4.0 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv3 |
| 版权网址: | 版权信息 |
App for Cloudflareapp-for-cf directory to your /wp-content/plugins/ directoryIt's done by using a Cloudflare Cache Rule that makes HTML pages eligible to be cached. Making a page eligible doesn't necessarily make it always cached (for example if a user is logged into the site or the request is a POST, you wouldn't want the page to be cached). No need for any kludgey cache busting mechanism that alters your URLs. This allows it to be done in a "clean" way, without the need for Cloudflare's Automatic Platform Optimization (APO) plugin/subscription (normally $5/month for Cloudflare Free plans). It also does not require the added complexity or expense of Workers (Workers are billed per request). Additionally it does not require the use of a Page Rule slot on your Cloudflare zone. This plugin can do Guest Page Caching for free, for everyone.
An easy way to test it is with a testing tool like GTmetrix. Test it without Guest Page Caching enabled and test it again with Guest Page Caching enabled and compare the results.
If you are a little more technical, you can look at the cf-cache-status HTTP header on the page request. If you see a value of HIT, the request is being successfully being served from Cloudflare's edge cache.
If you want to compare the speed of WordPress sites from different cities, try these:
Yes. Not only does it work as a standard plugin on any site within the network, it can be deployed as a "network activated" plugin (automatically available to all sites within the network). Additionally, there are settings available to the network admins where you can optionally set a default API token (that is used, but not disclosed to the individual sites). Individual sites can set a different API token to override the network-wide token if needed. This is useful in a scenario where all (or most) of the sites in the network are on the same Cloudflare account and can share the same API token. The Pro version allows a single Cloudflare R2 bucket to be used for storing the media for all sites in the multisite network.
There is an option to allow settings to be changed only by one specific admin account. If you use that setting, and then lose or change the admin account you assigned to that role, it can be problematic. If you need to bypass that option, you can by adding the following to your WordPress wp-config.php file:
define('CLOUDFLARE_BYPASS_USER_LOCK', true);
If your site is setup in a situation where the backend site URL is different from the frontend URL (for example, a headless WordPress setup), you can use the site_url WordPress filter to alter your site URL as needed. If you need something more granular (only altering the site URL for this plugin), you can add the following to your wp-config.php file (use your frontend URL in place of example.com):
define('CLOUDFLARE_SITE_URL', 'https://example.com');
Yes, please do! You can find the suggestion area over here.
app_for_cf_cache_times filter to change the default cache times for guest page cachingapp_for_cf_purge_cache filter to control (or piggyback) cache purginginet_pton() usage change (compatibility with a change in PHP 8.5.1, 8.4.16, 8.3.29, 8.2.30, 8.1.34)app_for_cf_guest_page_cacheable filter to allow third-party plugins to control page eligibility for guest page cachingwp-config.php file (for those that don't want to use a plugin or other mechanism to do add filters), this is done by adding a Closure object to $GLOBALS['filter_name'] within wp-config.phpAccount.Account Settings: Read & Account.Account Settings: Edit), for those upgrading from a previous version)User.API Token: Read), for those upgrading from a previous version)wp app-for-cf purge-cachedefine('CLOUDFLARE_SITE_URL', 'https://example.com');Only your user account optionSSL/TLS Encryption Mode to Strict (SSL-only origin pull) (for Enterprise zones)