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


This is working on one blog,but not on other,what could be the problem? How to find what is a problem?

Tnx in advance

share|improve this question
How is it not working? What happens? And did you try to use the init hook to start your session? – Bainternet Mar 18 '11 at 18:52
@Bainternet How do you mean how is ti not working? :) I done everything like in link that I paste in my question,and it is working on one project but not on second.How to make it work on both projects?How to find what is the problem? – user1147 Mar 18 '11 at 19:58
Ok then a different question, is it the same host? – Bainternet Mar 18 '11 at 21:32
@Bainternet, nope it is not same host. – user1147 Mar 18 '11 at 21:35
Ok , this is progress, check if session mod is enabled at your server – Bainternet Mar 18 '11 at 21:57

It's probably better to add your session_start(); to the top of your header.php file if you're planning to use it in your theme.

If you are wanting to use a session in the admin, I'd recommend either passing variables through $_GET or $_POST. Also, if you need long term storage of variables, it's pretty easy to store things in the options table. See the Settings API

share|improve this answer
Hi,tnx for response,will try to add to header to see is it working that way. – user1147 Mar 18 '11 at 17:20
nope,now it doesnt work on either of my two blogs. – user1147 Mar 18 '11 at 17:44

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.