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

Removing wordpress cookie from non-wordpress site

Your non-wordpress application cannot see the WP cookie because the WP session cookie is only set for the path that WP is installed in (/blog in your example).

You can configure WP to create the session cookie for the root path “https://wordpress.stackexchange.com/” so your non-wordpress application can manage it by modifying your wp-config.php, add –

define( 'COOKIEPATH',"https://wordpress.stackexchange.com/");
define( 'SITECOOKIEPATH',"https://wordpress.stackexchange.com/");

https://codex.wordpress.org/Editing_wp-config.php

Related Posts:

  1. 2 wordpress blogs with 1 users table and 1 login
  2. Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
  3. Login page ERROR: Cookies are blocked due to unexpected output
  4. SSO / authentication integration with external ‘directory service’
  5. Removing username from the ‘wordpress_logged_in’ cookie
  6. How to keep always logged in development environment
  7. Getting “Cookies are blocked or not supported by your browser” on login page
  8. Cookie settings for session across WPML subdomains using custom AJAX login
  9. Login redirect_to loop with reauth=1, cookie expiry set to 1 year in past
  10. Get user ID after logging in
  11. Login with cookie but without using WordPress code
  12. Get wordpress stored cookies for custom login
  13. How to get login data (session) outside WordPress?
  14. Block Logged-Out User Access to Directory Outside of WordPress using .htaccess and PHP file
  15. Login cookie across multiple domains on network w/ mapping
  16. Can’t login after URL change
  17. How to set different cookies for logged in admin users and logged in non admin users?
  18. Logins through alias
  19. Completely replacing the login form
  20. v5.6.2 User cannot stay logged in – wordpress_test cookie placed but not auth cookies
  21. wp-admin redirects to subdirectory after moving installation to subdirectory
  22. Single sign on with custom site
  23. Getting a person’s username from a wordpress cookie
  24. One time login on 2 different WordPress sites
  25. Single sign on for multiple domains
  26. How to force “remember me” users to login again?
  27. Multiple issues with Ajax login function due to browsers and cookies
  28. Sharing a logged in session with a custom subdmain site?
  29. Get WordPress logged in username from root domain when WP is installed in a subfolder
  30. wp-cron event doesn’t run when custom login API is enabled
  31. Extend Cookie with auth_cookie_expiration not working
  32. After moving WordPress to its own directory, login doesn’t work
  33. Custom login method appears to ignore auth_cookie_expiration
  34. Why deleting/removing cookies in WordPress does not log me out from admin?
  35. Cookies error during first time login attempt
  36. Opening protected page with cookie?
  37. WordPress Cookies – wp_set_auth_cookie
  38. Why doesn’t the “Remember Me” checkbox work for me on a live website? Only works on a local server environment
  39. Share login status across subdomains without network
  40. Handle POST request sent from an external site for login?
  41. Unable to login my subdirectory WordPress site
  42. How to remove without touching the pluggable.php the wordpress_logged_in cookie to show the username on login?
  43. In Django, how do I know the currently logged-in user?
  44. Can I programmatically login a user without a password?
  45. Is there any way to rename or hide wp-login.php?
  46. How to login with email only no username?
  47. How can I redirect user after entering wrong password?
  48. Increase of failed login attempts, brute force attacks? [closed]
  49. Separate registration and login for different roles
  50. Preventing session timeout
  51. How reduce wordpress login session timeout time?
  52. How to prefill WordPress registration with social details
  53. Check for correct username on custom login form
  54. Disallow user from editing their own profile information
  55. I can’t access my site via wp-admin
  56. ‘Password field is empty’ error when using autofill in Chrome
  57. How to show ‘login error’ and ‘lost password’ on my template page?
  58. What is $interim_login?
  59. Custom login form
  60. How to prefill the username/password fields on the login page
  61. wp_signon returns user, but the user is not logged in
  62. Adding extra authentication field in login page
  63. Prevent wp_login_form() from redirecting to wp-admin when there are errors
  64. Redirect user using the ‘wp_login_failed’ action hook if the error is ’empty_username’ or ’empty_password’
  65. wp_signon() does not authenticate user guidance needed
  66. What exactly is ReAuth?
  67. What are the differences between wp_users and wp_usermeta tables?
  68. wp_set_auth_cookie() doesn’t work in Ajax call
  69. Login members using web services
  70. Make my wordpress blog remember my login “forever”
  71. How to check in timber if user is loggedin?
  72. How do I change the language of only the login page?
  73. Disable WordPress 3.6 idle logout / login modal window / session expiration
  74. Stop WordPress from logging me out (need to keep me logged in)
  75. Woocommerce registration page [closed]
  76. How to disable autocomplete on the wp-login.php page
  77. Share login data/cookies between multiple installations
  78. Synchronize WordPress user accounts across multiple domains and installations without using WordPress MU
  79. How to pass users back and forth using session data?
  80. How do I change the logo on the login page?
  81. Why does WordPress hide the reset password key from the URL?
  82. Is it possible to sign in with user_email in WordPress?
  83. How to use current_user_can()?
  84. Avoid to load default WP styles in login screen
  85. WordPress registration message
  86. How to fake a WordPress login?
  87. how to display the wordpress login and register forms on a page?
  88. Does wp_logout_url() destroy a session? (Logging out question)
  89. How can I send a welcome email to a user AFTER they login for the first time?
  90. Can not login with correct username and password
  91. Website Visible only to Registered users
  92. How can i increase the login expiration length?
  93. How do I use add_action from a class method?
  94. How to remove the WordPress logo from login and register page?
  95. How can I add a custom script to footer of login page?
  96. Brute force attack?
  97. Customize wp_new_user_notification_email()
  98. Need to execute a cron job
  99. Login email after registration never sent or received
  100. How can I create a separate blog that is private?
Categories login Tags cookies, directory, login, single-sign-on
Cannot change caption for a plugin
WordPress crashed during update

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