Support » Fixing WordPress » Log-in loop

Viewing 12 replies - 1 through 12 (of 12 total)
  • ive had this problem before, but disabling the plugins and themes has always worked for me. is reinstalling WP an option?

    Already re-installed.

    In fact, that’s what set it off.

    I followed the directions for upgrading to 3.0.4 (which I did in 6 other installations with no problem), and then got this problem.

    in wp-config.php, enter this code


    and see if it generates any errors.

    Do I need to put that line anywhere in particular?

    I ask because I added it and got no errors.

    hmm, i am kind of at a loss as to what the problem could be then.

    one last thought: try disabling your password protection on the folder, and see if it works then. i’m not saying it will, but let’s just be sure that it’s not interfering.

    Sadly, that was the first thing that I tried.

    ok. after logging in, and it redirects you back to the login page, manually type in the path to the admin (wp-admin). when i had this problem, sometimes it would work.

    If I enter or, those both redirect to and I’m in the loop

    ok, next step is to figure out where the error is actually occurring. i’m assuming you are familiar with php and wordpress. you need to find the code that processes the login, and create some sort of method of determining where the script actually get’s caught.

    it can be something as simple as echoing your way through the alphabet every few lines of code (when it makes sense), or something more elaborate. just make sure you call the exit function at some point, to keep the script from redirecting back to the login page.

    I know just enough php and wp to be dangerous… but not enough to do what you’re suggesting.


    well, i’m out. aside from actually sitting down and working through it, i’ve got nothing else to suggest.

    you may want to take a chance, and learn a bit more about how wordpress works. tear it apart, touch it’s insides. 🙂 to diagnose your problem, open up wp-login.php, and follow it’s path of functions and commands. having a powerful search program will help locate function definitions and such.

    Hi there,

    i’m having the exact same problem with the latest version 3.2.1 (First install, default installation, no plugins, followed the steps in install guide), WP_DEBUG wont give me any useful info and yes, i already spent all day looking on the internet for “wordpress login loop”.

    After a bit of digging in the source code, TamperData and Firebug i found out that i am redirected from wp_login.php to /wp-admin/ and then back to wp_login.php again without any error message or useful information.
    As far as i can see it, the problem exists in /wp-includes/pluggable.php at function auth_redirect(), somewhere around line 824:

    if ( $user_id = wp_validate_auth_cookie( '', $scheme) ) {

    What is this? $user_id has not been defined or declared global inside this function (or am i missing something here?), hence it always skips this block and continues further down at // The cookie is no good so force login, kicking me back to wp-login.php and the the loop starts again.
    I can confirm that 2 cookies are set: wordpress_test_cookie = WP+Cookie+check and PHPSESSID = 161293d38543c1745381e6d939b957ee, and there is an empty (0 Bytes) session file sess_161293d38543c1745381e6d939b957ee in my php session folder, and the cookie-host is equal to whats set in tbl wp-options under siteurl and home.

    Any ideas?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Log-in loop’ is closed to new replies.