Fix WordPress Login Page Redirecting and Refreshing Issue

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.

What Is the WordPress Login Redirect Loop?

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:

  • You enter credentials and page just reloads with empty fields
  • You get redirected to wp-login?redirect_to=... in a loop
  • You see message: "You do not have sufficient permissions to access this page" after login
  • The issue started after a WordPress update, plugin installation, or URL change

What Causes the WordPress Login Redirect Loop?

Before jumping into fixes, it helps to understand the landscape of possible causes:

  • Corrupted browser cookies — WordPress uses cookies to manage login sessions. If your browser has corrupted or outdated WordPress cookies stored, it will keep sending invalid session data and WordPress will keep rejecting your login
  • WordPress URL mismatch — If your WordPress Address (URL) and Site Address (URL) don't match your actual domain — for example, one uses 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
  • Corrupted .htaccess file — A damaged .htaccess file can cause redirect rules to conflict with WordPress's own login redirect logic
  • Browser cache serving old broken data — An old cached version of your login page may be serving invalid session data
  • Faulty plugin — A security plugin, caching plugin, or membership plugin can intercept login requests, disrupt session management, or incorrectly block login forms
  • Incorrect file permissions — If WordPress can't write to session files or your user directory, it may refuse to save your session state
  • WordPress core files corrupted — Damaged core files — particularly those related to authentication — can break the login process entirely
  • SSL/HTTPS mixed content or misconfiguration — If your site recently moved to HTTPS but login forms still post to HTTP, a conflict can break authentication
01
Clear Browser Cookies and Cache (Start Here)

Because 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:

  • Chrome: Settings → Privacy and Security → Clear browsing data → Cookies and other site data
  • Firefox: Settings → Privacy & Security → Clear Data → Check both "Cookies" and "Site data"
  • Safari: Preferences → Advanced → Enable Develop menu → Manage Website Data → Remove All

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.

If the redirect loop persists after clearing cookies and testing in multiple browsers, the problem is on the server side. Continue to Fix 2.
02
Fix WordPress Address and Site Address URL Mismatch

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):

  1. Go to Settings → General
  2. Check both WordPress Address (URL) and Site Address (URL)
  3. Make sure both are identical and match your actual domain exactly — including http:// vs. https:// and www vs. non-www
  4. Click Save Changes

Fix 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:

PHP
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.

03
Fix Redirect Loop Caused by Faulty Plugin or Theme

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:

  1. Connect to your server via FTP
  2. Navigate to /wp-content/plugins/
  3. Rename the plugins folder to plugins_disabled
  4. Reload your site. If you can now log in, a plugin was the cause

If 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:

  • Wordfence: Aggressive firewall rules can block login access
  • iThemes Security: Login protection features can sometimes misfire
  • WP Rocket: Caching can conflict with session management
  • BuddyPress: Can block admin area login
04
Fix .htaccess File Redirect Conflicts

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:

Apache
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:

  1. Rename it to .htaccess_old via FTP
  2. Go to Settings → Permalinks in WordPress and click Save Changes

WordPress will generate a fresh, clean .htaccess file. Test your login again.

05
Fix SSL/HTTPS Redirect Conflicts

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://.

If your host manages HTTPS, verify there are no Force SSL or Disable SSL options in your hosting panel that conflict with WordPress redirects.
06
Fix Broken User Role or Capabilities

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):

  1. Go to Users → All Users
  2. Edit the problem user
  3. Set the role to Administrator and click Update User

Fix via database directly (Advanced):

SQL
-- 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.

07
Check Database User Tables and Restore from Backup

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.

SQL
-- 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:

  • Restore from a backup: Use UpdraftPlus, BlogVault, or your host's backup tool to restore your database
  • Fix manually: Use the SQL query from Fix 6 to restore administrator capabilities
If none of the above fixes work, the issue is likely a server-side configuration problem. Contact your hosting provider for assistance.

Quick Diagnostic: Match Your Symptom to the Cause

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 loopServer-level blocking or Hotlink Protection enabled
Redirects to wp-login.php?redirect_to=...Malware or modified .htaccess or corrupted login files

Preventing WordPress Login Page Redirecting Issues

  • Always check URL consistency. Never mix http and https:// or www and non-www. Always enforce HTTPS
  • Clear your cache after updates. After any theme, plugin, or WordPress core update, purge all caches and cookies
  • Review security plugins. Be careful with login protection plugins (Wordfence, iThemes Security, etc.). If settings are too aggressive, they can inadvertently break your login
  • Keep a current backup. If malware strikes and modifies your core files, a clean backup is your fastest route to recovery

Quick Reference: Login Redirect Fix Summary

Symptom Most Likely Cause Fix
Infinite redirect loopCorrupted .htaccess or cacheDisable caching plugins, regenerate .htaccess
Redirects to /wp-admin/ onlySite URL mismatchCheck WP_HOME and WP_SITEURL settings
"You don't have sufficient permissions"Broken user roleCheck user meta for admin capabilities
HTTPS redirect issueSSL misconfigurationCheck .htaccess for conflicting rules, clear cache
"This page cannot be reached" (loop)Server-level blockingContact your hosting provider
Redirects back to login formConflicting .htaccess ruleReset .htaccess via Permalinks
Redirects to home pageUser capabilities missingRestore admin role in database
Redirects to wrong domainURL mismatchUpdate WP_HOME and WP_SITEURL
Suspected malwareCore file corruptionScan and restore from clean backup

Frequently Asked Questions

Q: Why does my login redirect only happen in one browser?
A: This is usually a browser cache issue specific to that browser. If you can log in successfully in Chrome but it loops in Firefox, clear your cookies and try logging in a private window. If it still loops in that browser only, it's definitively a cache/cookie problem.
Q: Why does my login page redirect me to the front end instead of /wp-admin?
A: This usually means your WordPress Address (URL) in your settings is set to a different domain than the one you're using. Update it to match your live domain and the redirect will stop immediately.
Q: I created a new admin user in phpMyAdmin, but I still can't log in.
A: Clear your cookies first — the old invalid session data may still be active. If that doesn't work, temporarily switch to a default WordPress theme via FTP (rename your current theme folder) to rule out a theme conflict.
Q: I moved my site to HTTPS and now I can't log in.
A: Update your WordPress Address and Site Address to 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.

Final Thoughts

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.

Get in touch with us today and we'll get your site back online
Views: 149