MediaWiki extensions manual
Release status: stable
Description Purge the Cloudflare cache of edited and deleted pages
Author(s) Sophivorustalk
Latest version 1.0
MediaWiki >= 1.39.0
PHP 7.4+
License GNU General Public License 3.0 or later
  • $wgCloudflareEmail
  • $wgCloudflareAPIKey
  • $wgCloudflareZoneID
Quarterly downloads 2 (Ranked 139th)
Translate the CloudflarePurge extension if it is available at translatewiki.net

The CloudflarePurge extension automatically purges the Cloudflare cache of edited and deleted pages.


  • Download and move the extracted CloudflarePurge folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CloudflarePurge
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'CloudflarePurge' );
    $wgCloudflareEmail = '';
    $wgCloudflareAPIKey = '';
    $wgCloudflareZoneID = '';
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters

// Email address of your Cloudflare account
$wgCloudflareEmail = '';

// Cloudflare Global API Key, see https://dash.cloudflare.com/profile/api-tokens
$wgCloudflareAPIKey = ''

// Cloudflare Zone ID, see your Cloudflare Overview dashboard
$wgCloudflareZoneID = ''

See also

  • Manual:Cloudflare - Documentation on how to set up Cloudflare for MediaWiki
  • Extension:Cloudflare - Similar extension that also purges files, but hits the Cloudflare API with every page view