Cloudflare WordPress Plugin Automatic Cache Management

Last updated Apr 23, 2026

Overview

The Cloudflare WordPress plugin contains a feature called Automatic Cache Management. When a user adds, edits, or deletes a post, page, attachment, or comment - any associated URLs are purged from the Cloudflare cache.

When you switch a theme or customise a theme within the WordPress admin panel, the cache will automatically be cleared too.

Automatic Cache Management uses native hooks built into WordPress. The Cloudflare WordPress plugin purges the following cache URLs:

  • deleted_post
  • edit_post
  • delete_attachment
  • autoptimize_action_cachepurged (for compatibility with the Autoptimize WordPress plugin)
  • switch_theme
  • customize_save_after

Enable Automatic Cache Management

To enable Automatic Cache Management after installing the WordPress plugin:

  1. Log in to your WordPress account.
  2. Click Settings and choose the Cloudflare plugin. The Cloudflare plugin home page appears.
  3. Click Enable to the right of the Automatic Cache feature. A confirmation dialog appears.
  4. Click I'm sure in the confirmation dialog to confirm.

Was this helpful?

YesNo

On this page

Cloudflare WordPress Plugin Automatic Ca - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/support/third-party-software/content-management-system-cms/cloudflare-wordpress-plugin-automatic-cache-management/#page","headline":"Cloudflare WordPress Plugin Automatic Cache Management","description":"Manage automatic cache purging with the WordPress plugin.","url":"https://developers.cloudflare.com/support/third-party-software/content-management-system-cms/cloudflare-wordpress-plugin-automatic-cache-management/","inLanguage":"en","image":"https://developers.cloudflare.com/support/third-party-software/content-management-system-cms/cloudflare-wordpress-plugin-automatic-cache-management/og.png?v=18b0e642aaf29298","dateModified":"2026-04-23","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Enable HTTP/2 Server Push with the WordPress plugin. title: How do I enable HTTP2 Server Push in WordPress image: https://developers.cloudflare.com/support/third-party-software/content-management-system-cms/how-do-i-enable-http2-server-push-in-wordpress/og.png?v=7451bdafac7ffe53


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/support/llms.txt
Use this file to discover all available pages before exploring further.