You can do this in your init or config file.
ini_set('session.cookie_domain', substr($_SERVER['SERVER_NAME'], strpos($_SERVER['SERVER_NAME'],"."), 100));
Whenever PHP sets the ‘PHPSESSID’ cookie, the cookie will be available to all over the site including Blog.
Related Posts:
- PHP 7.2 – Warning: count(): Parameter must be an array or an object that implements Countable
- Sticky and NON-Sticky sessions
- Session timeout in ASP.NET
- Authentication: JWT usage vs session
- How to use my own custom session value in WordPress?
- achieving login implementation without using sessions
- Destroy user sessions based on user ID
- Enable WordPress Sessions
- Where is the wordpress session stored?
- How to get outside login data (session) in WordPress?
- Session problem in PHP – trying to create a simple CAPTCHA
- Multi-instance WordPress usingn Memcached to handle sessions requests login every time a requests is handled by a different server
- Would this be achieveable?
- Using session in WP without trouble with the API REST
- Re-use Nonce in Repeating Event Signup Buttons
- Plugin is attempting to start a session with WordPress. WP Session Manager will not work! DomPdf
- Session is not working properly
- Retrieve parameter from url
- Session constantly resets variable
- sharing the same cookie session with multiple wordpress installs on the same domain?
- How to check if the user was redirected?
- Session stays active until page update in dashboard
- Parsing session info between WordPress and non-WordPress
- $_SESSION dosent’t work
- Cookies vs. sessions
- ASP.NET Why are sessions timing out, sessionstate timeout set
- How to fix org.hibernate.LazyInitializationException – could not initialize proxy – no Session
- How to access Session variables and set them in javascript?
- Undefined variable: $_SESSION
- How to set session timeout in web.config
- Preventing session timeout
- Ban a user and end their session
- WordPress and PHP Sessions – Security and Performance
- Does wp_logout_url() destroy a session? (Logging out question)
- Find out what is using PHP sessions in WordPress
- How to log out everywhere else, destroy all sessions “all other devices”?
- SESSION in WordPress Plugin Development
- Set Session Time Limit for Password Protected Posts
- Using Sessions to Filter Posts – bad thing?
- how to create and show sessions in word press?
- Woocommerce cart is a non-object inside `admin_post` action [closed]
- Should I store my Facebook access tokens?
- How to get login data (session) outside WordPress?
- Custom Connect to Facebook, problem logging in/logging out
- integrating external php library into wordpress- the right way
- How can I test the login for an expired session?
- Random popup image per user with no repeat
- WP_Session not acting with AJAX
- How does WordPress handle sessions?
- How to get session token of current user in wp_login hook?
- Show menu item only if user is logged In (not word press login)
- homepage redirects to login page when user session expires
- wp_mail is sending two emails when used after retrieving session data
- External Authentication, session_tokens not destroyed on logout
- Fatal Error relating to sessions.php
- WordPress as webapp login session
- Session Experies and Get Logged Out Within Few Minutes
- How to store post ID’s in cookie or session to display the same posts later
- Logout USER form backoffice after 30 minutes of inactivity [closed]
- Session destroyed on page redirect
- Large Session Tokens
- captcha not working in my custom plugin
- How to make page/post password protected so you must reenter everytime you visit the page?
- Having Issue on Redirecting With Session in WordPress
- Front end ajax user login session issue
- Display if author page is author page of current user
- WooCommerce – set session with new cart item meta when updating cart item quantity [closed]
- How to change WordPress cookies to be session-only
- how do i change my website facebook login button to another text immediately user login? [closed]
- The session works on the local server, but not on the web server
- Can we stop session reset if page reloads?
- Where is function to prevents non logged users access wp-admin?
- Deleting expired session tokens in WordPress
- Authorize subdomain to access and read user and admin cookies
- PHP: $_SESSION destroyed after page reload for my custom session
- Adding preference buttons to main nav that persist via user sessions. (Woocommerce)
- logout users with specific role after close browser tab
- Unable to execute Ajax request, status code 400
- Using sessions or an alternative in a plugin
- Like and Dislike Buttons on Post with Counter – Only allow one click per post per user session
- End session screen not close automatically after login
- PHP session not staying alive. headers already sent
- Login issue with subdomain installs
- Get WordPress logged in username from root domain when WP is installed in a subfolder
- $_SESSION inside php function executed by AJAX
- PHP Session Variable to WordPress Error
- Looking to load a different template part on every load/refresh
- Allow user to select location and then set cookie for location in WordPress
- Capture and display users name
- How to create session for user which is not an admin user
- How to ‘remember’ a site member’s last visited page?
- Can’t redirect to previous page after using GET
- Session alternative for plugins (due to caching)
- Using a Cron Job to dynamically populate a field ONCE, and then making the field blank the next time someone visits page
- how to manage Session in WordPress using custom login?
- Sessions in word press [duplicate]
- determine active user browser at the same time
- How to dynamically change the locale?
- Recognize logged WP user in existing REST API
- Block non logged in users from accessing the media library