I am having some difficulty logging into my WordPress site. When I attempt to visit example.com/wp-admin, I see a blank page and the url bar changes to:
http://example.com/wp-login.php?redirect_to=http%3A%2F%2Fmysite.com%2Fwp-admin%2F&reauth=1
If I visit example.com/wp-login.php, I only see a blank white page without any change to the URL.
I have confirmed this is not a problem with anything on my local machine as the behavior persists across multiple browsers and devices.
I have found numerous forum posts about the issue but none offer a satisfactory solution.
Please help as I urgently need to update content on the site.
Update: I turned WordPress debugging on and see the following error
Fatal error: Cannot redeclare check_password_reset_key()
(previously declared in /home/wordpress/public_html/wp-login.php:281)
in /home/wordpress/public_html/wp-includes/user.php on line 1637
Any tips on how to fix this would be greatly appreciated
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.
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)
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.
I resolved this problem by defining security keys in
wp-config.php
: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)
Any time you have a forward from
http://mysite
tohttp://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:Changing
"/blog"
to"/blog/"
fixes the problem.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!
None of the above worked for me.
After enabling debug mode:
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.
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.
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
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.
Via apache error log.
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
… and a bit lower
Hope this helps someone, because googling did not help me.
I had the same problem but could not get ride off after spending too much time got this answer from here http://www.wpbeginner.com/wp-tutorials/how-to-fix-wordpress-login-page-refreshing-and-redirecting-issue/ so its just a cookie problem we need to clear browser cookie and enable it again and that`s it.
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.
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
https://
tohttp://
withinwp_options
.This might help others.
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.
The instructions here worked for me => https://core.trac.wordpress.org/attachment/ticket/37071/fix-wp-login-error.patch
it can be pretty stupid, but I solved this problem by checking the options table, I had to fix rows with site url
It happened to me after I changed site URL but I forgot to change
site_url
inwp_sitemeta
. Then I changed the value to the new URL, and problem solved.I fixed my problem by replacing the wp-login.php file with one of another website where the login was working.
my error was due to directive below in nginx confing file