Support » Networking WordPress » redirect loop after automatic wordpress logout

  • here’s my problem:
    a redirect loop is encountered in these circumstances:

    1. wordpress automatically logs user out after inactivity
    2. user clicks the logout link provided in my custom menu

    the only solutions i have found are:

    1. manually removing the wp logged in cookie
    2. manually resetting the secure auth keys and salts in wp-config.php

    here are details about my setup:

    1. wordpress multisite using subfolders
    2. main/root site is not the member restricted site
    3. using a global menu across all network sites with switch_to_blog() function

    to the best of my observation, logging out does not seem to trash the authentication cookie that is set upon login. the redirect loop appears to happen as a result of the browser thinking it is still logged into the site all the while wordpress being completely disconnected from the user.

    what can i do?


Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    What plugins are you running?

    Have you tried disabling the global menu to see if that’s the matter?

    here are some screenshots of the plugins that are active across my network. not all are active on every blog. there is also a screenshot of the network plugins that are activated.

    plugins used across the network sporadically

    network plugins

    lots of plugins actually.

    i use imember360 to manage the protected membership content.

    since this is a live site i cannot disable the global nav.

    it is a tough situation as disabling live plugins will essentially expose member content or bring down functionality completely.

    other primary plugins are easy video player, baw login logout, itracker360, wp filebase.

    is there anything in your experience that causes the cookie to remain once logging out?

    alternately, is there anything i can add to ensure that the cookie is removed upon logout?

    thanks ipstenu!


    i have since set up a dev site which allowed me to disable the global menu.

    i think i have isolated the problem to a theme specific issue.

    in the process, i have discovered something with the multisite network that seems to be an issue.

    here is what works well: when logging into the “main” multisite at the authentication accurately passes through to the other network sites allowing the user to navigate to any of the network sites.

    the problem i have now: whenever a wp_logout() is called either by a click or by the inactivity action, the logout or de-authentication is not passed to the other network sites and simply logs out of the active site on the screen.

    navigating to any of the other network sites after logging out shows and behaves as if the user is still logged in/authenticated.

    how can i make the wp_logout() function effectively trash the authentication cookie network site-wide and essentially log out of all of the network sites simultaneously?


    can anyone provide some insight into this particular wordpress multisite bug?

    if someone can offer help in finding a solution, i am willing to pay to get it accomplished.




    Forum Moderator

    Please try or

    This topic has now been closed as per the Forum Rules

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘redirect loop after automatic wordpress logout’ is closed to new replies.