Set up cache plugins and host caching
- View as Markdown Open this page as plain Markdown (opens in a new tab)
- Open in ChatGPT Ask questions about this page (opens in a new tab)
- Open in Claude Ask questions about this page (opens in a new tab)
- Open in Google AI Studio Ask questions about this page (Google account required) (opens in a new tab)
A fast membership site and a correct one go together. This guide shows how to set up Ultimate Membership Pro caching with the most common cache plugins and hosts, so pages load quickly for visitors while every member sees their own account, prices and members-only content.
Page caching saves a finished copy of a page and serves it to the next visitor without running WordPress. That is great for your blog and landing pages. Pages that change from one person to the next, such as the Member Portal or the checkout, must always be built fresh, so you tell the cache to leave them alone.
Before you start
- Your membership pages are set in Ultimate Membership Pro›Settings›Pages Setup. Open each one and copy its address.
- Write down the addresses of your members-only pages, or the part they share (for example
/members/). - Keep a private browser window open for testing as a visitor.
What to exclude from the cache
Add these pages to the list of pages your cache never stores. Most cache plugins accept either the full address or the part after your domain, such as /checkout/.
Register Page, Login Page and Lost Password Page. Their forms carry a security token that is valid for a limited time, so a cached copy stops working after a few hours.
Checkout Page and Thank You Page. They show the price, taxes and coupon of the person paying, and the payment confirmation.
The page that holds the Member Portal (the [ihc-user-page] shortcode), with its Profile, Subscriptions and Payments tabs.
The pricing page built with [ihc-select-level]. Exclude it when you use Control who can buy a Membership, so each person sees the plans meant for them.
Pages you restrict with the Locker box or Access Rules, and pages where an Inside Locker hides part of the content. Excluding a shared part of the address, such as /members/, covers them all at once.
Stripe, PayPal and the other gateways send their notifications to your site address followed by ?ihc_action=, for example https://example.com/?ihc_action=stripe_connect. If your cache lets you exclude addresses that contain a word, add ihc_action.
Tip
Give your members-only pages a common parent page, such as Members. Their addresses then all start with /members/, and one cache rule covers every page you add later.
Don’t cache pages for logged-in users
Logged-in members should get pages built for them. Most cache plugins already work this way. Check the option in your plugin and keep it set as below. When a plugin offers a separate cache per user instead (WP Rocket’s User Cache, LiteSpeed’s private cache, Speed Optimizer’s Logged-in Users Cache), that also keeps each member’s pages apart.
Settings for each cache plugin
Exclude pages in Settings›WP Rocket›Advanced Rules, field Never Cache URL(s), one address per line. Use /members/(.*) to cover every page under a parent. See WP Rocket’s guide to excluding pages from the cache.
Exclude pages in LiteSpeed Cache›Settings›Excludes, field Do Not Cache URIs. Keep Cache Logged-in Users off in the Cache tab, or on if you use LiteSpeed’s private cache.
In Performance›Page Cache, tick Don’t cache pages for logged in users and list the pages in Never cache the following pages.
In Settings›WP Super Cache›Advanced, choose Disable caching for logged in visitors and add the pages to Rejected URL Strings.
In Speed Optimizer›Caching, click the pencil next to Exclude URLs from Caching, add each address and click Confirm. SiteGround doesn’t serve cached pages to logged-in users unless you turn on Logged-in Users Cache. See SiteGround’s caching tutorial.
On the Settings tab, keep Don’t show the cached version for logged-in users on. Add each page on the Exclude tab with Add New Rule.
In WP-Optimize›Settings›Cache, keep Serve cached pages to logged in users off and list the pages under Advanced settings.
Host and CDN caching
Many managed hosts cache pages on their servers, in front of WordPress. Their caches already skip logged-in users; you only add the pages from Step 1.
Exclusions are set up by Kinsta. Send their support team the list of pages from Step 1 and ask them to bypass the cache for those addresses. See Kinsta’s server caching guide.
WP Engine doesn’t serve cached pages to logged-in users. Ask their support team to add the pages from Step 1 as page cache exceptions.
With Cloudflare’s WordPress APO, logged-in users already get fresh pages. If you added your own Cache Rules that cache everything, add a rule that bypasses the cache for the pages from Step 1.
Look for a cache or performance screen in your hosting panel, or ask support to exclude the pages from Step 1.
Clear the cache and test
- Clear the whole cache in your cache plugin, your host panel and your CDN.
- In a private window, open a members-only page. You should be redirected, or see the replacement message you set.
- Log in as a test member and open the same page. The content should be there.
- Open the Register, Login and Checkout pages and send each form once.
- Clear the cache again each time you change who can see a page.
Script optimization
If forms or payment fields stop working after you turn on options that combine, minify or delay JavaScript, exclude the files in wp-content/plugins/ultimate-membership-pro/assets/js/. Known compatibility issues has the details.
Troubleshooting
Do I have to turn off my cache plugin to use Ultimate Membership Pro?
No. Keep it on for your public pages and exclude the membership pages, the members-only pages and payment notification addresses.
Why does the login or registration form say “Something went wrong” on a cached page?
The form carries a security token that expires after some hours. A cached copy keeps the old token. Exclude the Register, Login and Lost Password pages from the cache and clear it.
A members-only page is still open to visitors. What should I check?
Clear every cache (plugin, host and CDN) and test in a private window while logged out. If the page is still open, see Restricted content is visible to everyone.
Do I need to exclude every members-only page one by one?
No. Put them under one parent page, such as Members, and exclude the shared part of the address, for example /members/.
Can I keep caching for logged-in users?
Yes, when your cache keeps a separate copy for each user, such as WP Rocket’s User Cache or LiteSpeed’s private cache. A shared cache for logged-in users would show one member’s pages to another.
What’s next
#1 Membership WordPress Plugin