When working with WordPress website builds that involve users and/or user-specific pages/content, you will often need to reach out to “whitelist” certain URLs from caching. Note that the URLs you want “uncached” may differ for your install.
If you are using plugins not listed here, you may need to request additional URLs to be excluded from cache.
For WP Rocket:
WP Rocket already excludes some URLs and Cookies from being cached. These are excluded already:
URLs:
- (.*)/feed/?
- /checkout/(.*)
- /cart/
- /my-account/(.*)
- /wc-api/v(.*)
- /wp-json/(.*)
Cookies:
- wordpress_logged_in_
- wp-postpass_
- wptouch_switch_toggle
- comment_author_
- comment_author_email_
For WP Engine:
To exclude certain URLs from WPEngine, you will have to chat them so they can manually exclude them for you. You can ask WPEngine to exclude the following URLs, depending on the plugin you’re using.
WooCommerce
- ^/my-account/?
- ^/product-category/?
- ^/wc-api/?
- ^/resetpassword/?
- ^/shop/?
- ^/cart/?
- ^/checkout/?
- ^/product/?
Theme My Login
- ^/login/?
- ^/logout/?
- ^/resetpass/?
- ^/register/?
- ^/lostpassword/?
- ^/your-profile/?
For Cloudways:
- If you’re using Cloudways, change the trailing question mark to be an asterisk *.
- If the install is on Cloudways, you can go to Application Settings > Varnish Settings > Add New Rules.