Session is not starting

No, there’s no disadvantage to starting a session directly in your theme’s functions.php.

However, it’s strange that starting your session on init is not working for you. Could it perhaps be that output is being generated (perhaps a space or a line break) before init? Could you turn WP_DEBUG on and see if any notices or warnings are being shown?

Leave a Comment