How to exclude content from popular free caching plugins in WordPress
Caching plugins are an easy way to make your pages load faster without wasting time on complicated technical tasks, but they are also a primary source of headaches for developpers out there, as they often make their work more complicated. In some cases, the last resort solution is to exclude a give page from the cache to make sure it will work properly. Here is how to do it in WordPress with the most popular free caching plugins.
Exclude content from WP Super Cache
If you want to exclude a page from WP Super Cache, for example the contact page, here are the steps you should follow:
Go to the WP Super Cache settings page in your WordPress dashboard.
Navigate to the Advanced tab in the top menu of that page
Scroll down to the Rejected URL String section
In the box for rejected URL strings, add the pages you want to exclude from the cache (one per line). In our case, it would be /contact/ with the trailing slash, as we use it.
Click Save
Exclude content from Cache Enabler
Using the Cache Enabler plugin, here is how you can exclude some pages from the cache. Again, we’ll do it for the Contact page for the example.
Go to Settings > Cache Enabler
Scroll down to Cache Exclusions
Chose how you want to exclude your post, in this example I used the ID of the contact page, which is the easiest. You can also regex for page path or query strings, but it’s more advanced.
Scroll down to the Never cache the following pages section.
Enter the page you don’t want to be cached, for example /contact/. This supports regular expressions and is followed by several useful sections to exclude by category, tag, author, or use of a specific custom field use.
Exclude content from WP Fastest Cache
WP Fastest Cache is also pretty straightforward for cache exclusions, here is how to do it:
In the WordPress dashboard, go to the WP Fastest Cache menu item.
Navigate to the Exclude tab.
Add a new rule to exlude pages, the easiest is to use “Contains” and include text that allows to identify the page or pages you want to exclude.