WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am coding a plugin and it seems wordpress discourage use of Sessions. I have a kind of wizard for non-logged in users that asks for First Name, Last Name etc and some conditional questions from users in 4 different steps and then eventually registers user and shows his username/pass in last step.

I am stuck on this last step since I am not able to hold data in sessions. Should I even use Transients API to hold this kind of data? How can I make Transients data a non-logged in user specific? Don't want to use cookies or you think I must use cookies in this scenario?

share|improve this question
What is wrong with sessions? – toscho Jan 8 '13 at 22:05
should I go for PHP sessions? It seems wordpress discourages use of session to keep itself stateless. Just trying to do things wordpress way and keep myself updated. – mysterious Jan 8 '13 at 22:15

Use sessions when they are appropriate.

Our fellow mod @EAMann has written a useful session class for exactly these cases. There is a plugin described here that offers a different API.

Just make sure to start the session only when you really need one. Google and other crawler don’t accept cookies, so you would end up with lots of duplicated URLs indexed like this:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.