19 comments

  1. Had the same problem… clearing the cookies didn’t do the trick.

    What did the trick was logging in via incognito mode first, and then I was able to login normally.

  2. There are many possible causes to this problem. Some have to do with your database. Try turning on WP_DEBUG and interpreting the error messages.

    In my own case (which is how I stumbled on your question here), the problems was writing a session token into usermeta. I went into PhpMyAdmin > wp_usermeta > and deleted the meta_value for session_token. (Detailed story here https://wordpress.org/support/topic/possible-fix-for-sudden-redirect-loop-at-wp-login-with-reauth1)

  3. This could be caused by a wordpress table crashing.
    Setting define(‘WP_DEBUG’, true); in the wp-config.php will show you exactly what table has crashed if this is the case.

  4. I resolved this problem by defining security keys in wp-config.php:

    define('AUTH_KEY',         '');
    define('SECURE_AUTH_KEY',  '');
    define('LOGGED_IN_KEY',    '');
    define('NONCE_KEY',        '');
    define('AUTH_SALT',        '');
    define('SECURE_AUTH_SALT', '');
    define('LOGGED_IN_SALT',   '');
    define('NONCE_SALT',       '');
    

    For some reason they were empty… Replace empty strings by some generated here: https://api.wordpress.org/secret-key/1.1/salt/ (thanks Josh Rodgers)

  5. Any time you have a forward from http://mysite to http://mysite/, this is bound to happen. In my case, I have a managerial httpd process running that has several virtual hosts. One was configured thusly:

    <VirtualHost *:*>
        ServerName mysite.com
        ProxyPass "/blog" "http://bloghtml/blog/"
        ProxyPreserveHost On
    </VirtualHost>
    

    Changing "/blog" to "/blog/" fixes the problem.

  6. I also had this issue but had a different message. After working through the myriad of fixes: htaccess, renamed plugins, renamed theme, checked for blank space in wp-config.php I was still stuck.

    Logging into PHPMyAdmin I tried to optimize tables but got a user denied error. It turned out to be the database itself being oversize and then ‘blocked’ by the shared hosting. After finding the main culprit (a Wordfence log table) I truncated that, waited 30 minutes and hey presto, it all worked again.

    Thought this might help someone else completely stuck after trying every other suggested option!

  7. None of the above worked for me.

    After enabling debug mode:

    define('WP_DEBUG', true);
    

    in wp-config.php

    The site was telling me permission issues with the database user…

    What did work for me, was reverting back to the root database user (rather than a ‘web’ user with less permissions).

    Obviously not a long-term solution but gives you something else to try that may work for you.

  8. this happened to my when I upgraded my website to php v7.4. downgrading to php 7.3 solved it.
    Unfortunately, I don’t know how to keep the version and fix the issue. Hopefully soon WP developers will fix this issue.

  9. Just went through this same thing. No luck with clearing cache, .htaccess, DB session clearing, ftp disabling plugins etc. I was able to log in w/ Chrome incognito. Afterwards I was still not able to log in normally. Browser cache alone did not work, I had to specifically delete all cookies related to the domain.

    Settings > Show Advanced Settings > Content Settings >

    Under Privacy Settings, click on the “Content Settings” button

    Under Cookies, click on the “All Cookies and Site Data” button

    Then Search for your website by a keyword in the search box:
    Highlight your website and click Delete on your keyboard.

    Click Done and try to login to your site again (in Normal mode .. ie. just exit out of Incognito mode by closing the window)

    If you already had the site open in another tab, you’ll get a cookie error. close all tabs, re-open, login and enjoy

  10. I would like to contribute to the community and also since this problem was very annoying. Non of the solution worked for me. I did not install any plugins before it happened so definitely I think it is a WordPress bug!

    My exact errors:
    Via WP debugger. After login screen came white screen with this error.

     Fatal error: Class 'PasswordHash' not found in /var/www/public_html/example.net/wp-includes/pluggable.php on line 2079
    

    Via apache error log.

    PHP Fatal error:  Class 'PasswordHash' not found in /var/www/public_html/example.net/wp-includes/pluggable.php on line 2138, referer: http://example.net/wp-login.php?redirect_to=http%3A%2F%2Fexample.net%2Fwp-admin%2F&reauth=1
    

    How I did solve the problem.
    1. In DB I edited my admin password to plain text password.
    2. Added these lines of code to pluggable.php. Basically now WP recognizes non hashed passwords.
    Here is the edited extracts of pluggable.php

    function wp_check_password($password, $hash, $user_id = '') {
    <------>global $wp_hasher;
    
    <------>//20170713 Added by Stefan
    <------>$check=($hash==$password);
    <------>return apply_filters('check_password', $check, $password, $hash, $user_id);
    

    … and a bit lower

    function wp_set_password( $password, $user_id ) {
    <------>global $wpdb;
    
    <------>//$hash = wp_hash_password( $password );
    <------>//20170713 Changed by Stefan
    <------>$hash=$password;
    

    Hope this helps someone, because googling did not help me.

  11. I fix this by using https:// to access my website instead of http:// that way I did not get any redirection.
    https://my_website.com/admin
    You can also change the “siteurl” and “home” values in the options table via phpmyadmin in the cpanel to point to a https.
    I am of observant that this could be an issue with ssl not redirecting properly.

  12. I expericed this issue after migrating my site from one server to another. After importing the database to the new server, I wasn’t able to login. On the new server I hadn’t SSL-secure the site yet, so I had to change the siteurl and home in the database.

    Fix

    • I fixed it by going to database and changing siteurl and home from https:// to http:// within wp_options.

    This might help others.

  13. Try removing the querystring in the URL (“?” and everything behind it) – that is: visit wp-login.php directly. It worked for me. I tried changing password, changing salts, clearing meta_value for session_tokens in wp_usermeta. None of that worked.

    Sorry, I know this does not help you, as you say your wp-login.php screen is white, but it might help someone who like me got drawn here by the headline.

  14. it can be pretty stupid, but I solved this problem by checking the options table, I had to fix rows with site url

    (1, ‘siteurl’, ‘example.com’, ‘yes’),
    (2, ‘home’, ‘example.com’, ‘yes’),
    (3, ‘blogname’, ‘my web site’, ‘yes’),
    
  15. It happened to me after I changed site URL but I forgot to change site_url in wp_sitemeta. Then I changed the value to the new URL, and problem solved.

  16. I fixed my problem by replacing the wp-login.php file with one of another website where the login was working.

  17. my error was due to directive below in nginx confing file

    location ~ .php$ {
    
                   #fastcgi_hide_header "Set-Cookie"; # Cache page with cookie 
    

Comments are closed.