{"id":775,"date":"2026-10-20T09:03:46","date_gmt":"2026-10-20T08:03:46","guid":{"rendered":"https:\/\/userswp.io\/documentation\/article\/logout-not-working\/"},"modified":"2026-10-20T09:03:46","modified_gmt":"2026-10-20T08:03:46","slug":"logout-not-working","status":"publish","type":"gd_place","link":"https:\/\/userswp.io\/documentation\/article\/troubleshooting\/logout-not-working\/","title":{"rendered":"UsersWP logout not working or users still logged in"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Most login and logout problems come from one of three things: a hand-made logout link, caching, or a mix of http and https (or www and non-www) addresses. Check them in this order.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use the UsersWP logout link<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Do not add <code>wp-login.php?action=logout<\/code> as a custom link. A WordPress logout link needs a security token. Without it, WordPress asks &#8220;Do you really want to log out?&#8221; or sends people somewhere unexpected.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to Appearance > Menus.<\/li>\n\n\n\n<li>Open the UsersWP Endpoints box and the Logged-In tab, and tick the logout item.<\/li>\n\n\n\n<li>Click Add to Menu, then Save Menu.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">UsersWP builds that link with a fresh token for each user. See <a href=\"https:\/\/userswp.io\/documentation\/article\/first-steps\/add-menu-items\/\">Add Menu Items<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Still logged in after logging out<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If logging out seems to work but the next page shows the user still logged in, the browser is usually getting a cached copy of the page. Exclude the UsersWP pages from your page cache, make sure the cache plugin does not serve cached pages to logged-in users, and clear the cache. See <a href=\"https:\/\/userswp.io\/documentation\/article\/troubleshooting\/login-cache-issue-site-showing-logged-out-after-login\/\">Login Cache Issue, site showing logged out after login<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Security plugins that change login cookies or the login URL can cause the same thing. Turn them off for a test.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Having to log in twice<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Go to Settings > General and compare WordPress Address (URL) and Site Address (URL). They should use the same scheme and host, for example both <code>https:\/\/www.example.com<\/code>. If one uses http or leaves out www, the login cookie is set for one address and the user then lands on the other, where they look logged out. WordPress also treats the other address as an external site, so logout redirects can end on the wrong page. Use the same address in your menu links too.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Logging in to wp-admin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If Redirect wp-login.php? is ticked under UsersWP > General > Login, visits to wp-login.php go to the UsersWP login page. Log in there and admins can then open wp-admin. Roles chosen in Restrict wp-admin on the same screen cannot open wp-admin at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the browser shows its own small username and password box before wp-admin loads, that is password protection set on the server (HTTP authentication), not UsersWP. Your host can remove it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where users go after logging out<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Choose the page in Logout Redirect Page under UsersWP > General > Login. For a different page per role, use UsersWP > Redirects.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most login and logout problems come from one of three things: a hand-made logout link, caching, or a mix of http and https (or www and non-www) addresses. Check them in this order. Use the UsersWP logout link Do not add wp-login.php?action=logout as a custom link. A WordPress logout link needs a security token. Without [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[39,7],"class_list":["post-775","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-troubleshooting","gd_placecategory-tips-tricks-more"],"_links":{"self":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/comments?post=775"}],"version-history":[{"count":0,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/775\/revisions"}],"wp:attachment":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/media?parent=775"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/tags?post=775"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/categories?post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}