You go to your WordPress login page, enter your username and password, click Log In — and instead of reaching your dashboard, page just reloads. Or it redirects you back to the same login screen. Over and over again, no matter how many times you try.
This infuriating issue is known as the WordPress login redirect loop — and it's one of the most frustrating problems a WordPress site owner can face because it locks you completely out of your own website. The good news: you don't need to reinstall WordPress or lose any content. In almost every case, this problem has a clean, straightforward fix. This guide covers every known cause and every proven solution, step by step.
The WordPress login redirect loop occurs when you submit valid login credentials but WordPress fails to authenticate your session correctly. Instead of forwarding you to /wp-admin/, it sends you back to wp-login.php — sometimes in an endless loop, sometimes with a brief flash before the page refreshes.
You may experience it in different ways:
Before jumping into fixes, it helps to understand the landscape of possible causes:
www.yourdomain.com and the other doesn't, or one uses http:// and the other uses https:// — WordPress gets confused routing your login redirect path.htaccess file can cause redirect rules to conflict with WordPress's own login redirect logicBecause WordPress relies entirely on cookies for login sessions, corrupted cookies are the single most common cause of login loops. This is always the first fix to try — it takes 30 seconds and resolves the problem more often than you'd expect.
Clear WordPress cookies specifically:
Test in a private/incognito window — This bypasses cookies entirely.
Test in a completely different browser — If you can log in successfully in a fresh browser (e.g., Edge or Brave) but it loops in Chrome or Firefox, it's definitively a browser issue.
A mismatch between your WordPress Address (URL) and Site Address (URL) is the second most common cause of login loops. WordPress uses these two URLs to construct the redirect path after login.
Fix via WordPress admin (if accessible):
http:// vs. https:// and www vs. non-wwwFix via wp-config.php (if locked out):
Edit wp-config.php via FTP and add these two lines just before the /* That's all, stop editing! */ comment:
define( 'WP_HOME', 'https://yourdomain.com' );
define( 'WP_SITEURL', 'https://yourdomain.com' );
Replace https://yourdomain.com with your actual domain. Save the file and try logging in again.
Security plugins, caching plugins, and membership plugins are frequent causes of login loops because they intercept login requests. A plugin conflict can redirect post-login requests to a wrong URL or block session cookies.
The Fix — Disable all plugins via FTP:
plugins_disabledIf you can log in, re-enable plugins one at a time, testing after each one, until you find the culprit.
Common plugins that cause login loops:
A corrupted .htaccess file with conflicting redirect rules is a common culprit — especially when mixed with SSL redirect rules or caching rules.
Check for conflicting redirect rules:
Open your .htaccess file via FTP and look for blocks like this:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^wp-login.php$ - [R,L]
This rule forces /wp-login.php to redirect. If placed incorrectly or combined with a conflicting cache plugin rule, it can lock you into the loop.
Reset your .htaccess file:
.htaccess_old via FTPWordPress will generate a fresh, clean .htaccess file. Test your login again.
If your site recently moved to HTTPS and the login loop started then, your server configuration is likely the culprit.
Check your server settings:
Contact your hosting provider and ask them to check if your server configuration allows correct handling of WordPress login requests.
Clear .htaccess SSL conflicts:
Check your .htaccess for double redirect rules or legacy code conflicting with WordPress's core login logic.
Verify your URL settings:
Make sure your WordPress Address and Site Address in Settings → General both use https://.
WordPress login redirects can be caused by database corruption of user roles — specifically the Administrator or Editor roles. If these roles are missing or capabilities like read are removed, WordPress doesn't recognize you as an admin and sends you back to the login page.
Fix via WordPress admin (if accessible):
Fix via database directly (Advanced):
-- Check current user capabilities
SELECT meta_value FROM wp_usermeta
WHERE user_id = 1 AND meta_key = 'wp_capabilities';
-- Restore admin capabilities
UPDATE wp_usermeta
SET meta_value = 'a:1:{s:13:"administrator";b:1;}'
WHERE user_id = 1 AND meta_key = 'wp_capabilities';
Once updated, clear your cookies and try logging in again.
In severe cases — especially after a malware attack or a bad plugin update — WordPress user tables can be modified to downgrade admins or restrict their capabilities.
-- Check all meta for a specific user
SELECT * FROM wp_usermeta WHERE user_id = 1;
-- Check user level (legacy)
SELECT meta_value FROM wp_usermeta
WHERE user_id = 1 AND meta_key = 'wp_user_level';
If admin capabilities are missing or corrupted, restore them:
| What You See | Most Likely Cause |
|---|---|
| Infinite redirect loop (fast refresh) | Corrupted .htaccess redirect rules or cache plugin |
| Infinite redirect loop (even after waiting) | Site URL mismatch (HTTP vs HTTPS) |
| "You don't have sufficient permissions..." (in loop) | Database corruption — user roles changed |
| "This page cannot be reached" error in loop | Server-level blocking or Hotlink Protection enabled |
Redirects to wp-login.php?redirect_to=... | Malware or modified .htaccess or corrupted login files |
http and https:// or www and non-www. Always enforce HTTPS| Symptom | Most Likely Cause | Fix |
|---|---|---|
| Infinite redirect loop | Corrupted .htaccess or cache | Disable caching plugins, regenerate .htaccess |
| Redirects to /wp-admin/ only | Site URL mismatch | Check WP_HOME and WP_SITEURL settings |
| "You don't have sufficient permissions" | Broken user role | Check user meta for admin capabilities |
| HTTPS redirect issue | SSL misconfiguration | Check .htaccess for conflicting rules, clear cache |
| "This page cannot be reached" (loop) | Server-level blocking | Contact your hosting provider |
| Redirects back to login form | Conflicting .htaccess rule | Reset .htaccess via Permalinks |
| Redirects to home page | User capabilities missing | Restore admin role in database |
| Redirects to wrong domain | URL mismatch | Update WP_HOME and WP_SITEURL |
| Suspected malware | Core file corruption | Scan and restore from clean backup |
https://yourdomain.com. Also check .htaccess for conflicting HTTPS rules. If you use a CDN like Cloudflare, clear its cache and ensure it isn't stripping necessary cookies.
The WordPress login redirect loop is annoying — but it's rarely a sign of catastrophic database corruption. In most cases, it's a URL mismatch, a cached login page, or a corrupted cookie.
Work through the fixes in order: clear cookies first, check your URL settings, inspect .htaccess, and test via phpMyAdmin to fix database issues. In the vast majority of cases, one of these will solve it.