University of Michigan: Cloudflare Cache #4 in Performance & Caching
Wordpress Cloudflare plugin
by U-M: OVPC Digital · github.com/its-cloudflare/umich-cloudflare · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/its-cloudflare/umich-cloudflare/releases/download/1.1.0/umich-cloudflare-1.1.0.zipDeclares an update source (https://github.com/its-cloudflare/umich-cloudflare/releases/latest), so updates arrive through the plugin's own updater.
Readme
U-M Cloudflare Cache Purge Manager
Provides easy and automatic ability to purge cloudflare cache for your whole site, section, or a page. Also adds metabox to override TTL and Disable cache for a specific page/post/cpt.
This requires that you have an existing CloudFlare API key.
Install
WP Admin/Dashboard Method
This requires that your site has write access to the plugins folder.
- Download the latest package (e.g. umich-cloudflare-x.x.x.zip)
- Go to WP Admin/Dashboard -> Plugins -> Add New -> Upload Plugin
- Select the downloaded zip file and Upload
- Activate Plugin
- Configure plugin settings (WP Admin/Dashboard -> Settings -> U-M: Cloudlfare
- Add your API Key (Provided by ITS or your units Cloudflare manager)
Manual Method
- Download the latest package (e.g. umich-cloudflare-x.x.x.zip)
- Extract zip
- Upload the umich-cloudflare folder to wp-content/plugins/ folder in your site
- Activate Plugin
- Configure plugin settings (WP Admin/Dashboard -> Settings -> U-M: Cloudlfare
- Add your API Key (Provided by ITS or your units Cloudflare manager)
Custom Integrations
Filters
umich_cloudflare_settings
Override the plugins saved API settings.
add_filter( 'umich_cloudflare_settings', function( $settings ){
// your code here to modify settings as necessary
return $settings;
});
umich_cloudflare_menu_purge_page
Ability to disable the Admin Menu Page Purge menu item.
add_filter( 'umich_cloudflare_menu_purge_page', '__return_false' );
umich_cloudflare_menu_purge_section
Ability to disable the Admin Menu Section Purge menu item.
add_filter( 'umich_cloudflare_menu_purge_section', '__return_false' );
umich_cloudflare_admin_form_settings
Customize which settings should be available for management. Useful in complex wordpress environments.
add_filter('umich_cloudflare_admin_form_settings', function( $settings ){
$settings['apikey'] = false;
$settings['zone'] = false;
$settings['ttl'] = false;
$settings['ttl_browser'] = false;
$settings['ttl_static'] = false;
$settings['ttl_static_browser'] = false;
return $settings;
});
Pantheon Filters
umich_cloudflare_pantheon_surrogate_keys
Adjust which surrogate keys are issued in the request.
add_filter( 'umich_cloudflare_pantheon_surrogate_keys', function( $keys ){
$keys[] = 'my-custom-key';
return $keys;
});
Actions
umich_cloudflare_purge_page
Called before cloudflare purge page request.
$paths: paths to be purged
add_action( 'umich_cloudflare_purge_page', function( $paths ){
// do something
});
umich_cloudflare_purge_all
Called before cloudflare purge all request
$paths: paths to be purged
add_action( 'umich_cloudflare_purge_all', function( $paths ){
// do something
});
umich_cloudflare_admin_settings_save
Called after settings validation and before settings save.
$settings: reference of the form settings
$hasErrors: reference of the forms boolean error flag
add_action( 'umich_cloudflare_admin_settings_save', function( $settings, $hasErrors ){
// custom action code here
if( !$hasErrors ) {
if( $settings['apikey'] ) {
// do something
}
}
});
Custom Purge Integration
There are some public functions that can be called to perform custom cache purging integrations.
UMCloudflare::purgePage( $path ) Purge a specific url from the cache.
// RETURNS: true on success, false on failure
UMCloudflare::purgePage( '/path-to-my-page/' );
UMCloudflare::purgeAll( $paths ) Purge everything that starts with a path
// RETURNS: true on success, false on failure
UMCloudflare::purgeAll('/');Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| 1.1.0 | Jun 25, 2026 | umich-cloudflare-1.1.0.zip | 190 |
| 1.0.14 | Sep 25, 2025 | umich-cloudflare-1.0.14.zip | 229 |
| 1.0.13 | Sep 23, 2025 | umich-cloudflare-1.0.13.zip | 38 |
| 1.0.12 | May 21, 2025 | umich-cloudflare-1.0.12.zip | 150 |
| 1.0.11 | Jan 24, 2025 | umich-cloudflare-1.0.11.zip | 143 |
| 1.0.10 | Oct 28, 2024 | umich-cloudflare-1.0.10.zip | 80 |
| 1.0.9 | Oct 23, 2024 | umich-cloudflare-1.0.9.zip | 32 |
| 1.0.8 | Sep 25, 2024 | umich-cloudflare-1.0.8.zip | 39 |
| 1.0.7 | Sep 24, 2024 | umich-cloudflare-1.0.7.zip | 15 |
| 1.0.6 | Sep 12, 2024 | umich-cloudflare-1.0.6.zip | 34 |
| 1.0.5 | Aug 8, 2024 | umich-cloudflare-1.0.5.zip | 26 |
| 1.0.4 | Jul 11, 2024 | umich-cloudflare-1.0.4.zip | 12 |
| 1.0.3 | Jun 19, 2024 | umich-cloudflare-1.0.3.zip | 14 |
| 1.0.2 | Jun 11, 2024 | umich-cloudflare-1.0.2.zip | 8 |
| 1.0.1 | Apr 26, 2024 | umich-cloudflare-1.0.1.zip | 6 |
| 1.0.0 | Apr 18, 2024 | umich-cloudflare-1.0.0.zip | 2 |
Active-site estimate ≈140 comes from the median of recent superseded releases. Method.