🔥 Limited Time Offer: 37 Premium Readymade WordPress Websites Agency Bundle Kit worth ₹9,99,999 — now just ₹29,999 ⏳ Order Now
How to Fix WordPress Login Redirect Loop
How to Fix WordPress Login Redirect Loop
Trying to log in to WordPress but it keeps redirecting you back to the login page? Or wp-admin automatically redirects to wp-login.php? This is called a login redirect loop and it usually happens due to cookies, plugins, site URL conflicts, corrupted .htaccess, or caching issues. Here’s the complete solution.
What Causes the WordPress Login Redirect Loop?
wp-login.php → wp-admin → wp-login.php → loop repeats.
The login redirect loop happens when WordPress cannot verify the login cookie or cannot authenticate your session.
Common causes include:
- Corrupted cookies or browser cache
- Incorrect WordPress URL or Site URL
- Plugin conflicts (security plugins especially)
- Incorrect .htaccess rules
- Corrupted login/session files
- HTTPS mismatch (HTTP vs HTTPS)
- Cloudflare or CDN interference
- File permission issues
Step 1: Clear Cookies & Browser Cache
The easiest and most common fix.
Clear the following:
- Browser cookies
- Browser cache
- Site-specific cookies for yourdomain.com
Now try logging in again in:
- Incognito mode
- A different browser
- A different device
If login works → cookie corruption was the issue.
Step 2: Fix WordPress URL & Site URL
URL mismatch is the #1 cause of redirects.
If you can’t access admin, update URLs via wp-config.php:
define('WP_HOME', 'https://yourdomain.com');
define('WP_SITEURL', 'https://yourdomain.com');
Make sure:
- Both use HTTPS
- Both match www OR non-www
- No trailing slash mismatch
Incorrect URLs force continuous redirects.
Step 3: Disable All Plugins (Fix Plugin Conflicts)
Security plugins often block login sessions.
If you cannot access dashboard:
- Go to /wp-content/
- Rename plugins → plugins-disabled
- Try logging in again
If login works now → plugin conflict confirmed.
Plugin types that cause login loops:
- Wordfence
- iThemes Security
- All In One Security
- Limit Login Attempts
- Caching plugins
- Redirect plugins
- Force SSL plugins
Step 4: Regenerate the .htaccess File
Broken rewrite rules cause login redirects.
Steps:
- Rename .htaccess → .htaccess-old
- Go to Settings → Permalinks
- Click Save Changes to generate a new .htaccess file
This resets default WordPress rewrite rules.
Step 5: Disable Cloudflare or CDN Rules
Cloudflare sometimes blocks login cookies.
Turn OFF temporarily:
- Cloudflare Proxy (Grey Cloud)
- Bot Fight Mode
- Under Attack Mode
- Rocket Loader
Add a Page Rule:
*yourdomain.com/wp-login.php*
Security: Off
Cache Level: Bypass
If login works → Cloudflare was interfering.
Step 6: Fix HTTPS Redirect Conflicts
Too many HTTPS rules = infinite loop.
Check for multiple redirects from:
- Hosting panel (Force HTTPS)
- Cloudflare HTTPS rules
- .htaccess HTTPS rules
- Plugins enforcing SSL
Enable HTTPS from only one place (preferably hosting or Cloudflare).
Step 7: Reset WordPress Cookies & Salts
Corrupted authentication keys break login sessions.
Open wp-config.php and replace the AUTH keys/salts:
Get new keys from:
https://api.wordpress.org/secret-key/1.1/salt/
Copy & paste all new keys into wp-config.php.
This logs everyone out and resets sessions fully.
Step 8: Check File Permissions
Incorrect permissions can break login cookies.
- Folders → 755
- Files → 644
- wp-config.php → 600
Fix especially:
- /wp-content/
- /wp-includes/
- /wp-admin/
Step 9: Rename .htaccess Files Inside Subdirectories
Nested .htaccess files can override login behavior.
Check and rename .htaccess inside:
- /wp-admin/
- /wp-includes/
- /wp-content/uploads/
These files can accidentally redirect login attempts.
Step 10: Reactivate Plugins/Theme Carefully
Once login works, re-enable features safely.
- Reactivate plugins one-by-one
- Check login after each activation
- Switch back to your main theme
If the issue returns → the last activated plugin/theme caused it.
Want Hassle-Free WordPress Login Always?
All SiteCrafted websites come with secure, stable login authentication, optimized URLs, correct cookies, Cloudflare rules, and proper .htaccess configuration.