WordPress plugins like WP Rocket offers add-on for integrating with Cloudflare caching. This helps to clear the cache whenever you update a page’s content and rebuild the latest cache. Though this works for posts and pages, it does not work for the pages outside your WordPress setup. Best example is your robots.txt file which will never show proper content unless you manually clear Cloudflare cache. If you are struggling with clearing single page’s caching from Cloudflare here is how you can do that.
Purging Entire Cache
After updating a page’s content, generally users go to Cloudflare account and click “Purge Everything” option to delete the entire site’s cache even though they want to clear a single page’s cache. This is a simple action regardless of you have an integrated caching plugin installed or not. However, it is not a correct action as rebuilding entire site’s cache will take longer time. Until then site will load slowly due to the delivery of uncached pages. The correct action is to only delete the required page(s) cache in Cloudflare.
Delete Single Page Cache in Cloudflare
Follow the below instructions after publishing the modified content. Note that this is a common process regardless of whether you use WordPress or any other content management platform.
- Login to your Cloudflare account and select the site from dashboard.
- Navigate to “Caching” section and click “Configuration” option.
- Click “Custom Purge” button in “Purge Cache” section.
- On the “Custom Purge” pop-up, select “URL” option.
- Enter full URL of the page that you want to purge and click “Purge” button.
- You will see message in the status bar showing the asset is successfully purged and the changes will take 30 seconds to take effect.
Make sure to copy paste the correct page URL from WordPress dashboard or from the browser’s address bar. You can enter up to 30 URLs in the box and purge the cache in single time. This will not affect any other cached on your site.
Still Not Seeing Latest Content?
If you are not seeing the latest content after clearing Cloudflare cache, then do/check the followings:
- Log out of your WordPress admin dashboard and check.
- Clear your browser’s cache (press “Control/Command + Shift + Delete” in all browsers except Safari Mac) or use another browser or use incognito/in-private browser mode.
- If you are checking an old page, make sure to first edit the page and click “Update” button. Generally, your caching plugin will delete the cache when you update a page. After that, go to Cloudflare account and purge the page URL.
- Sometimes you need to update other static files like ads.txt or robots.txt through FTP or File Manager. In such a case, you may need to manually delete server side cache before deleting Cloudflare cache.