Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

One time login on 2 different WordPress sites

Just wanted to add my own experience to this thread. I’ve tried many different configurations of WordPress cookie constants in wp-config without any luck. I’m setup in the same way as described by the OP using custom_user_table and meta_table.

I’ve found the session information does actually translate across different pages if you use COOKIE_DOMAIN as another answer suggested (in my case domain.com and domain.com/support) – and the session data is there but WordPress still doesn’t log you in. I’m still looking into the issue. I also found I needed to define the COOKIEHASH constant for the session data to match.

define('COOKIEHASH', md5( 'domain.com') );

You also need to make sure the salts in wp-config are identical.

Also a note to other folks that might have a similar issue – you need to set and manage user capabilities for the 2nd installation and that info is stored in the 2nd installs user meta table (even though you explicity set a different custom user meta table pointing to the primary install).

Related Posts:

  1. Removing username from the ‘wordpress_logged_in’ cookie
  2. How to get login data (session) outside WordPress?
  3. Get WordPress logged in username from root domain when WP is installed in a subfolder
  4. Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
  5. Login page ERROR: Cookies are blocked due to unexpected output
  6. Preventing session timeout
  7. How reduce wordpress login session timeout time?
  8. Disable WordPress 3.6 idle logout / login modal window / session expiration
  9. How to pass users back and forth using session data?
  10. How to fake a WordPress login?
  11. Does wp_logout_url() destroy a session? (Logging out question)
  12. Getting “Cookies are blocked or not supported by your browser” on login page
  13. How can I test the login for an expired session?
  14. Cookie settings for session across WPML subdomains using custom AJAX login
  15. Login redirect_to loop with reauth=1, cookie expiry set to 1 year in past
  16. How do I extend auto logout on idle OR redirect inline popup
  17. Get user ID after logging in
  18. Login with cookie but without using WordPress code
  19. Get wordpress stored cookies for custom login
  20. how to logout user on browser tab or window closes
  21. Login cookie across multiple domains on network w/ mapping
  22. Can’t login after URL change
  23. Custom Connect to Facebook, problem logging in/logging out
  24. How to set different cookies for logged in admin users and logged in non admin users?
  25. 2 wordpress blogs with 1 users table and 1 login
  26. How can I test the login for an expired session?
  27. Logins through alias
  28. How does WordPress handle sessions?
  29. How to get session token of current user in wp_login hook?
  30. WordPress as webapp login session
  31. v5.6.2 User cannot stay logged in – wordpress_test cookie placed but not auth cookies
  32. Session Experies and Get Logged Out Within Few Minutes
  33. Share WordPress login info with other PHP app
  34. Removing wordpress cookie from non-wordpress site
  35. Getting a person’s username from a wordpress cookie
  36. How to force “remember me” users to login again?
  37. Multiple issues with Ajax login function due to browsers and cookies
  38. Sharing a logged in session with a custom subdmain site?
  39. End session screen not close automatically after login
  40. Login issue with subdomain installs
  41. wordpress login loop and session problem
  42. wp-cron event doesn’t run when custom login API is enabled
  43. Extend Cookie with auth_cookie_expiration not working
  44. Custom login method appears to ignore auth_cookie_expiration
  45. Why deleting/removing cookies in WordPress does not log me out from admin?
  46. Cookies error during first time login attempt
  47. Opening protected page with cookie?
  48. Why WordPress not logout after I have close my browser?
  49. WordPress Cookies – wp_set_auth_cookie
  50. User not logged first time I open the homepage
  51. Why doesn’t the “Remember Me” checkbox work for me on a live website? Only works on a local server environment
  52. Share login status across subdomains without network
  53. How to limit user to login only once per session
  54. How to remove without touching the pluggable.php the wordpress_logged_in cookie to show the username on login?
  55. Cookies vs. sessions
  56. In Django, how do I know the currently logged-in user?
  57. How do I expire a PHP session after 30 minutes?
  58. Can I programmatically login a user without a password?
  59. Is there any way to rename or hide wp-login.php?
  60. How to login with email only no username?
  61. How can I redirect user after entering wrong password?
  62. Increase of failed login attempts, brute force attacks? [closed]
  63. Separate registration and login for different roles
  64. SSO / authentication integration with external ‘directory service’
  65. How to prefill WordPress registration with social details
  66. Check for correct username on custom login form
  67. Disallow user from editing their own profile information
  68. I can’t access my site via wp-admin
  69. ‘Password field is empty’ error when using autofill in Chrome
  70. How to show ‘login error’ and ‘lost password’ on my template page?
  71. What is $interim_login?
  72. How to share cookies and sessions between domain and subdomain?
  73. Custom login form
  74. How to prefill the username/password fields on the login page
  75. wp_signon returns user, but the user is not logged in
  76. Adding extra authentication field in login page
  77. Prevent wp_login_form() from redirecting to wp-admin when there are errors
  78. Redirect user using the ‘wp_login_failed’ action hook if the error is ’empty_username’ or ’empty_password’
  79. wp_signon() does not authenticate user guidance needed
  80. What exactly is ReAuth?
  81. What are the differences between wp_users and wp_usermeta tables?
  82. Is it possible to transfer a WordPress session to a different browser via query string?
  83. wp_set_auth_cookie() doesn’t work in Ajax call
  84. Login members using web services
  85. Make my wordpress blog remember my login “forever”
  86. How to check in timber if user is loggedin?
  87. How do I change the language of only the login page?
  88. Stop WordPress from logging me out (need to keep me logged in)
  89. Woocommerce registration page [closed]
  90. How to disable autocomplete on the wp-login.php page
  91. Share login data/cookies between multiple installations
  92. Synchronize WordPress user accounts across multiple domains and installations without using WordPress MU
  93. How do I change the logo on the login page?
  94. Allow up to 5 Concurrent Login Sessions
  95. Why does WordPress hide the reset password key from the URL?
  96. Is it possible to sign in with user_email in WordPress?
  97. How to use current_user_can()?
  98. Avoid to load default WP styles in login screen
  99. WordPress registration message
  100. how to display the wordpress login and register forms on a page?
Categories login Tags cookies, login, session
How to change the menu like this?
How to speed wordpress disqus plugin loading?

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress