Search code examples
wordpresssession-management

Wordpress session management


I'm putting up a site using Wordpress and I'd like to piggyback on its sessions. But I'm not finding any plugins, or even documentation. Any suggestions or references before I start hacking it?

Note: I'm asking about if and how WP uses standard PHP sessions itself, not how to add PHP sessions e.g. using session_start(). Apparently any state WP maintains is accomplished by other means. So if I want to use PHP sessions I need to add and maintain it myself entirely, using techniques like those in the thread.

Thanks all!


Solution

  • WordPress doesn't appear to call session_start() because it wants to be stateless and if register_globals is defined, it automatically destroys your $_SESSION