User Agents

Web browsers and everyday web tech, explained

Clear Cloudflare Cache in WordPress: A Complete Guide

· 4 min read · Cookies and Cache

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Clearing your Cloudflare cache ensures that visitors see the most recent version of your WordPress website by removing outdated, cached copies of your pages stored on Cloudflare's global edge servers. When you make changes to your CSS, HTML, or images, those updates may not appear immediately because Cloudflare continues to serve the old version to improve loading speeds. Purging the cache forces Cloudflare to fetch a fresh copy of your site from your origin server.

What You'll Need

  • An active Cloudflare account with your website already configured.
  • Administrator access to your WordPress dashboard.
  • (Optional) The official Cloudflare WordPress plugin if you prefer managing the cache from your dashboard.

Step-by-Step

There are two primary ways to clear your Cloudflare cache: using the Cloudflare Dashboard (the most direct method) or using the official WordPress plugin (the most convenient method for frequent updates).

Method 1: Using the Cloudflare Dashboard

  1. Log in to your Cloudflare account dashboard.
  2. Select the specific domain/website you wish to manage from your account list.
  3. In the left-hand sidebar menu, click on Caching and then select Configuration.
  4. Locate the Purge Cache section. You will see two options: "Purge Everything" and "Custom Purge".
  5. To clear every single cached file across your entire site, click the Purge Everything button.
  6. Confirm the action when the pop-up appears. Note that this will temporarily increase the load on your origin server as Cloudflare re-caches your content.
  7. If you only changed one specific page or image, select Custom Purge, choose "URL", and paste the exact link to the file or page you updated. Click Purge.

Method 2: Using the Cloudflare WordPress Plugin

  1. Log in to your WordPress admin area.
  2. Navigate to Plugins > Add New and search for "Cloudflare". Install and activate the official plugin.
  3. Go to Settings > Cloudflare.
  4. Enter your Cloudflare email address and your API Key (found in your Cloudflare account under My Profile > API Tokens).
  5. Once connected, scroll down to the Purge Cache section.
  6. Click Purge Cache to clear the entire site cache, or select specific options to purge only the cache for the current page you are editing.
  7. Click Save Changes to ensure the settings are applied.

Common Mistakes

  • Purging too frequently: Overusing "Purge Everything" can lead to slower page load times for your visitors because the edge servers must constantly fetch data from your origin server.
  • Ignoring the Browser Cache: Users often purge the Cloudflare cache but forget to clear their own browser cache or use an Incognito window, leading them to believe the purge didn't work.
  • Confusing Plugin Caches: Many WordPress users have multiple caching layers (e.g., WP Rocket, W3 Total Cache, and Cloudflare). Purging Cloudflare does not automatically purge your WordPress plugin cache; you must clear both.
  • Using the wrong API Key: When setting up the plugin, using a restricted API token instead of the Global API Key can sometimes lead to connection errors.

Tips

  • Use Development Mode: If you are making heavy design changes, enable "Development Mode" in the Cloudflare Caching tab. This bypasses the cache for 3 hours, allowing you to see changes in real-time without manual purging.
  • Selective Purging: Whenever possible, use "Custom Purge" for specific URLs. This preserves the cache for the rest of your site, maintaining high performance for your users.
  • Coordinate Purges: Always clear your internal WordPress cache (plugin level) before clearing the Cloudflare cache. This ensures Cloudflare pulls the newest version from your server rather than a cached version stored by your plugin.

Troubleshooting

If you have purged your cache but the changes are still not appearing, try the following steps:

  • Check Incognito Mode: Open your site in a private browser window. If the changes appear there, the issue is your local browser cache, not Cloudflare.
  • Verify the Cache Level: Check your Cloudflare "Caching Level" settings. If it is set to "Cache Everything" via a Page Rule, some dynamic content may be cached more aggressively than usual.
  • Check for Server-Side Caching: If you use managed WordPress hosting (like Bluehost, SiteGround, or WP Engine), your host likely has its own caching layer. Clear the hosting cache via your hosting panel or WordPress dashboard.
  • Inspect HTTP Headers: Use browser developer tools (F12) and check the "Network" tab. Look for the cf-cache-status header. If it says "HIT", you are seeing a cached version. If it says "MISS" or "EXPIRED", the purge worked and a new version was fetched.

Frequently Asked Questions

Does purging the cache slow down my site?

Temporarily, yes. Because the edge servers no longer have the files, they must request them from your origin server, which takes slightly longer than serving them from the cache.

How often should I clear my Cloudflare cache?

Only when you have made visible changes to your site's content, design, or code that need to be reflected immediately for all visitors.

What is the difference between Purge Everything and Custom Purge?

Purge Everything clears every single file across your entire domain. Custom Purge allows you to specify a single URL or a specific tag to clear, leaving the rest of the site's cache intact.

Will purging the cache delete my website content?

No. Purging only removes the temporary copies of your pages stored on Cloudflare's servers. Your actual website files and database remain untouched on your origin server.

Why do I need a plugin to clear the cache?

You don't need one, but the plugin allows you to trigger a purge directly from the WordPress dashboard without having to log in to the Cloudflare website separately.