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

How to get login data (session) outside WordPress?

I solved my problem, and it could definitely help others too.

The problem was with cookies since my folder structure was like this :

  • mysite.com
  • mysite.com/mypage.php
    • mysite/wordpress/

the cookies were only valid for wordpress folder, and it’s subdirectories.

In order to activate the cookies outside wordpress, I installed the root Cookie plugin, and everything works fine now.

P.S.

Do NOT change the configuration of root Cookie. Just leave the Domain Name setting as empty.

Related Posts:

  1. Removing username from the ‘wordpress_logged_in’ cookie
  2. Disable WordPress 3.6 idle logout / login modal window / session expiration
  3. How to fake a WordPress login?
  4. One time login on 2 different WordPress sites
  5. Get WordPress logged in username from root domain when WP is installed in a subfolder
  6. Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
  7. How can I redirect user after entering wrong password?
  8. Login page ERROR: Cookies are blocked due to unexpected output
  9. Preventing session timeout
  10. How reduce wordpress login session timeout time?
  11. Custom login form
  12. Prevent wp_login_form() from redirecting to wp-admin when there are errors
  13. How do I change the language of only the login page?
  14. How to pass users back and forth using session data?
  15. Avoid to load default WP styles in login screen
  16. Does wp_logout_url() destroy a session? (Logging out question)
  17. Can not login with correct username and password
  18. How can I add a custom script to footer of login page?
  19. How to keep always logged in development environment
  20. I want to disable E-Mail verifcation / activation when a user signs up for my WordPress site
  21. custom login page redirect to logged in user profile page
  22. Action wp_login_failed not working if only one field is filled out
  23. Getting “Cookies are blocked or not supported by your browser” on login page
  24. How to customise wp-login.php only for users who are setting a password for the first time?
  25. How can I test the login for an expired session?
  26. WordPress Login Footer URL
  27. Remove built in wordpress login and use only google auth
  28. Cookie settings for session across WPML subdomains using custom AJAX login
  29. Login redirect_to loop with reauth=1, cookie expiry set to 1 year in past
  30. Change Login Page for a Multisite Subsite
  31. How do I extend auto logout on idle OR redirect inline popup
  32. Positioning the “Lost your password?” and “← Back to Site”
  33. send users logging in from wp-login.php directly to home page of site, rather than dashboard
  34. Get user ID after logging in
  35. Login with cookie but without using WordPress code
  36. Get wordpress stored cookies for custom login
  37. how to logout user on browser tab or window closes
  38. Login cookie across multiple domains on network w/ mapping
  39. Can’t login after URL change
  40. Custom Connect to Facebook, problem logging in/logging out
  41. How to set different cookies for logged in admin users and logged in non admin users?
  42. 2 wordpress blogs with 1 users table and 1 login
  43. How can I test the login for an expired session?
  44. Logins through alias
  45. How does WordPress handle sessions?
  46. How to get session token of current user in wp_login hook?
  47. Add class to input form in login form
  48. Allow access to a page for admins only
  49. Customizing login error messages
  50. Customizing the WordPress login form
  51. Restricting frontend acess based on user role otherwise redirect to login form
  52. how to restrict user login whenever if a user puts on hold by editing wp-login action?
  53. How do I force “users must be registered and logged in” on subsites?
  54. deny IPs from wp-login using .htaccess
  55. Passing username to login screen
  56. Login error redirecting to wp-login page
  57. How can I prevent my custom form from redirecting to wp-login?
  58. reset password link redirect to login page
  59. How do I replace “Username” in the WordPress login form?
  60. Custom Login iframe doesn’t work
  61. Password reset – Disabled for LDAP accounts
  62. WordPress as webapp login session
  63. How to Get Logged-in to “Remote WP Site” from my local script (in Same Browser)?
  64. Replace dash with space in username on login
  65. Autologin only working the second time
  66. replace wp-login.php login forms via a hook & use custom forms with wp-login form validation
  67. v5.6.2 User cannot stay logged in – wordpress_test cookie placed but not auth cookies
  68. Session Experies and Get Logged Out Within Few Minutes
  69. Share WordPress login info with other PHP app
  70. Auto login between word press subdomain and a .net website
  71. Disabling standard registration login with username/email and password?
  72. How to change wordpress Log In text
  73. WordPress error on log out ‘Not Permitted’ and can’t log out
  74. Redirect wp-login
  75. Is wp_login_form secure on a non secure page?
  76. Removing wordpress cookie from non-wordpress site
  77. Is the login encrypted before it is sent? If so how to do I encrypt it the same way?
  78. Form Action submit over https
  79. Is there anyway to get the inputted password string from the login form?
  80. Login and Forgot password in Lightbox
  81. Forcing frontend login with UI switch
  82. Getting a person’s username from a wordpress cookie
  83. Prevent display password on wp-login.php
  84. Change default login auth
  85. wordpress login without password just email address (NO 2 factor authentication with email)
  86. WordPress SSL not working [closed]
  87. Where is the php file, that does the checks for login information?
  88. Cannot Get User id after login success in file wp_login.php
  89. Alert Message through email or phone(Message)
  90. Moving from one host to another – cannot access the dashboard
  91. Temporally disable password to login with empty password?
  92. How are all users now set to inactive?
  93. How to force “remember me” users to login again?
  94. Multiple issues with Ajax login function due to browsers and cookies
  95. Sharing a logged in session with a custom subdmain site?
  96. woocommerce store login not working at first time
  97. How do I change the language of the login page to Arabic?
  98. How do you implement a login feature on a WordPress site?
  99. End session screen not close automatically after login
  100. How to add custom authentication to wordpress login and register
Categories login Tags cookies, login, session, wp-login-form
Can I have two single.php files and have one display just the post and the other display comments for that specific post?
Creating WordPress Plugin solely for Admin panel with dash menu and submenus

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