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
- S_SESSION variable (user role) not recognised
- ASP.NET Why are sessions timing out, sessionstate timeout set
- How to use cURL to send Cookies?
- “Cannot send session cache limiter – headers already sent”
- How to declare session variable in C#?
- How to fix the session_register() deprecated issue?
- Undefined variable: $_SESSION
- How to store and receive variables in WP sessions?
- Removing username from the ‘wordpress_logged_in’ cookie
- Are transients private or public?
- Is it possible to transfer a WordPress session to a different browser via query string?
- WordPress and PHP Sessions – Security and Performance
- Does wp_logout_url() destroy a session? (Logging out question)
- share login/logout sessions across two installs?
- How can I test the login for an expired session?
- 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]
- 2 different post->IDs for single page load only in Firefox
- how to logout user on browser tab or window closes
- Site Health : An active PHP session was detected
- Custom Connect to Facebook, problem logging in/logging out
- Random popup image per user with no repeat
- How does WordPress handle sessions?
- How to get session token of current user in wp_login hook?
- WooCommerce: Change default country on the cart page [closed]
- Trigger a function immeditely after a user posted a comment
- Disconnect automattically after X minutes
- WordPress as webapp login session
- How to implement a $_SESSION alternative in WordPress inside a theme without a plugin?
- WordPress Keeps Logging Out – What Tests Can I Run to Solve This?
- 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
- iframe does not store session/cookie when refresh parent
- Login/Logout Session Sharing – Multiple WordPress Installations
- Disallow second login session
- Permalink structure with $_SESSION variables
- Unique session WordPress
- Safe to start a php session on get_header action?
- Unset session variable on page reload / setup but exclude AJAX
- Turning on output buffering in a wordpress plugin
- Run query_posts if SESSION is empty?
- keep a variable for all pages in memory from the url
- $_SESSION variable not saving on page refresh or new page
- $_SESSION variables work perfectly on my local machine but returns NULL on development webserver
- Custom $_SESSION expires too early
- Get current session in WP admin
- Store and Change Session variable – PHP SESSION VARIABLE
- PHP session when called wp_ajax_nopriv
- One time login on 2 different WordPress sites
- Error when setting cookie
- Replacing a placeholder term with a session variable value in taxonomy filter
- Codeless random token generation to pass into multiple tracking links in a single page load
- add class to element if user is not logged in [closed]
- Strange admin-ajax / CSS / $_SESSION issue
- Plugin or ways to limit number of users logging in the website,
- Are there any drawbacks on opening a session_start in functions.php and header.php?
- Restricting wordpress login sessions for a web app
- Correct user session/cookie handling with external site connection in wordpress
- Requiring a Visitor to Enter a Password Each Time They visit a Page
- after logout session not destroy from server/website side
- Sessions with WordPress
- Why isn’t working WooCommerce session inside shortcode?
- Use WP user status (logged_in) to manage access to independent application
- how to remember specific action/event for current user?
- How to destroy all user sessions via WP-CLI
- Add class when more page is visited
- User not logged first time I open the homepage
- Where are Sessions are being started? [closed]
- WordPress & PHP sessions
- How to limit user to login only once per session
- How to transfer session after being redirected to other page
- Suddenly sessions and header location not working
- WordPress keep logged in after browser close