Stuck in an infinite loop when trying to log in to my wordpress site. I type in the URL/wp-admin and then it loops me back to the regular website, not the admin login page.
I have tried with http and https to no luck...
I found a solution. In
In my situation, I migrated to https from http, and use plugin Rename wp-login.php
wp-config.php contained the lines:
Without the line
define('FORCE_SSL_ADMIN', false);, a redirect loop occurs.
I've just solved an issue with this symptom. The 8 key and salt values must be present in the
wp-config.php file or admin doesn't work.
I had these in the file, but because of how I dynamically generated
wp-config.php the values were appended at the bottom of the file. Any constant definitions (
define()) must be placed above the
/* That's all, stop editing! Happy blogging. */ line.
Wordpress gave no error or logs to indicate it was missing config items. This also stopped
'WP_DEBUG', true working. Once I moved all of these higher in the
wp-config.php file everything started working.
Don't worry, you'll be back in quick if you follow these steps one at a time, until one succeeds!
I spend hours trying to resolve this, did everything. Eventually notice a log about group write permissions on the wp-login.php file. Looked and the server file permissions were 664 .. changed them to 644 and problem solved.
I had the same issue after moving my site from a production host to localhost for dev testing. Steps that work for me in production didn't work locally. For instance, when using Chrome as my browser, entering
http://localhost/wp/wp-admin would redirect to
Entering my username/password would redirect back to the second link with a new username/password prompt.
Firefox resolution: add to wp-config.php:
Chrome resolution: Remove the redirect querystring from the login page: e.g. http://localhost/wp/wp-login.php .
Yes, I'm fairly new to Wordpress and I'm not 100% certain of the internal route for logins and redirects after authentication, so much trial and error was involved to find these two solutions. Hopefully they can help someone else.