Simple Membership Plugin › Forums › Simple Membership Plugin › swpm_session cookie slows my site to a crawl
- This topic has 1 reply, 1 voice, and was last updated 2 months, 1 week ago by
admin.
-
AuthorPosts
-
September 12, 2026 at 5:16 am #32303
smallwarfare
ParticipantSeems lie every page creates an swpm_session cookie from the Simple WordPress Membership plugin. It is preventing StackCDN from caching public pages…which makes my site slow down to a crawl.
If I go into → StackCache → Advanced Settings and consider Remove All Cookies From My Homepage is that going to disrupt anything? what is the other option?
September 12, 2026 at 5:18 am #32305admin
KeymasterFirst, some context on that cookie.
swpm_sessionis not the login cookie. The plugin assigns every visitor a random session ID, and that ID is used only as a key for short-lived front-end status messages (registration errors, profile update confirmations, password reset notices). It expires when the browser closes and holds no member data.It is also only issued once per visit, not on every page. The Set-Cookie header goes out on the first request, and after that the cookie is simply present in each request. So what is slowing you down is the CDN treating any request that carries a cookie as uncacheable, rather than the plugin re-issuing it each time.
The cookie you actually want the cache to react to is
swpm_in_use(andwp_swpm_in_use). We set that one only when a member logs in, specifically so caching layers can bypass the cache for logged-in members while still serving cached pages to everyone else. Full cookie list here:
https://simple-membership-plugin.com/cookies-used-by-simple-membership-plugin/What I would recommend:
- Ask their support to ignore swpm_session in the StackCDN caching decision, and to bypass cache only when swpm_in_use, wp_swpm_in_use or wordpress_logged_in_* is present. This is the proper fix and it applies site-wide. StackCache itself has no cookie exclusion field, so this has to be done at the CDN/edge level.
- In StackCache > Cache Exclusion, exclude your membership pages: the login page, the join/registration page, the thank you page, and any member-only pages. Those should never be served from cache.
- Leave everything else cached as normal.
On “Remove All Cookies From My Homepage”: it only affects the homepage, so it will not solve the problem across the rest of your site. It is safe if your homepage is plain public content with no membership elements. Do not enable it if your homepage contains the login form or login widget, the registration form, or protected content, because stripping cookies from that response also strips the login cookies and the login will silently fail.
I would also leave “Remove PHP Session Cookies From All Pages” alone. That targets PHPSESSID, not our cookie, and it can break other plugins.
More background on caching and membership sites:
https://simple-membership-plugin.com/understanding-the-impact-of-caching-on-membership-sites/ -
AuthorPosts
- You must be logged in to reply to this topic.