Members' Login Session Expires Too Soon

I’ve had an issue for a long time that I haven’t been able to solve (until I found a thread on here). Patrons report that when they close their browser, they must re-authenticate with Patreon to view gated content on my website. And it’s not only when they close their browsers, but also some report that this is the case when they simply wait around a day, even when leaving their browsers open. These reports come from users with different browsers and different levels of personal security.

I have almost no plugins on my website, and almost certainly nothing that would impact a very routine expectation such as a login to persist for more than a few hours. I have reached out to Wordpress to see if I have anything set that could prevent cookie persistence, but I don’t think I ever got my point across well.

It’s frustrating for users, and I was re-inspired to do some digging until I found this thread: Users having to log in with Patreon constantly - #2 by Zanaras

I found 3 instances of the function “wp_set_auth_cookie()” in the plugin file: patreon_login.php. Since I was unsure which instance the user in that thread changed (he did not mention there being 3 instances), I modified the file as he had tried (though I typically don’t like editing plugin files myself) but changed all 3 instances.

And sure enough, users are now reporting that the problem has been solved. What a relief.

But before I rush off in excitement, I want to find out: is what I’ve been experiencing common? And should I have tried to solve it this way (which feels like a hack), or is there another way I should have tried to fix this?

Kind Regards

No, what you are experiencing is not common and it would likely result from how your site or host’s server deals with sessions, especially PHP sessions, cookies etc. Plugins may modify that behavior as well. If the sessions were being lost the moment the browsers are closed, this would possibly point to PHP settings having that session length or WP setting that as session length. Also could be some plugin doing that.

1 Like

Thank you. I have a Wordpress Business plan, so many things are managed by Wordpress. I suppose I will try asking them again to see if they can be of any help. Have the changes I’ve made (hopefully temporarily) opened the door to anything weird I wouldn’t want, do you think, until I can get this resolved?

Many thanks

Since you are at’s business plan, you shouldnt be able to permanently change PHP or WP session settings. However if you installed a plugin that modifies WP session behavior, yes, it can do that.