Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting · Troubleshooting

How to Fix a Login Page That Keeps Refreshing in WordPress

Short answer

A WordPress login page that keeps refreshing usually means your login cookie is not sticking, not that your password is wrong. Clear your browser cookies and cache for the site, then check that the WordPress Address and Site Address match the address you use. If the loop continues, deactivate all plugins, check your .htaccess file, and ask your host to check HTTPS and server cache settings.

Key takeaways

  • A silent login refresh usually means the login cookie failed, while a wrong password shows an error message.
  • WordPress keeps you logged in with cookies, so blocked or stale cookies send you back to the login form.
  • The WordPress Address and Site Address must match the exact address you type, including https and www.
  • Renaming the plugins folder by FTP turns off every plugin at once when you cannot reach the dashboard.
  • A damaged .htaccess file can redirect the login page, and WordPress can rebuild a fresh one from Settings > Permalinks.
  • If the loop started after an SSL or proxy change, the HTTPS setup between WordPress and the proxy is the likely cause.

Why does the WordPress login page keep refreshing?

The page refreshes because WordPress cannot keep you logged in after it checks your password.

A login has 3 steps: you submit your username and password, WordPress checks them, and then it sets a login cookie and sends you to the dashboard. If that cookie is missing, expired, or invalid, the dashboard has no proof you logged in, so it sends you back to the login form.

WordPress uses cookies to verify who you are, and you must have cookies enabled in your browser to log in, according to the WordPress cookies handbook. On login, WordPress uses a wordpress_[hash] cookie to store your authentication details, and that cookie is limited to the /wp-admin/ area.

SymptomWhat it usually means
Form reloads with no errorLogin cookie did not stick
“Cookies are blocked” messageBrowser refused the test cookie
Browser reports too many redirectsRedirect rule or HTTPS mismatch
Loop starts after a move or SSL changeSite address or proxy setting is wrong

How do you know the problem is not your password?

A wrong password shows an error message, while a refreshing page shows no error at all.

WordPress tells you plainly when a password is wrong. A silent reload means the login likely worked and something right after it failed. That difference is the fastest clue you have, so note which one you see before you change anything.

The username and password fields are case-sensitive, according to the WordPress login troubleshooting guide. Check caps lock and retype both fields once. If the same credentials work in a private window, the password was never the problem.

How do you clear cookies and cache to fix the login loop?

Clear your browser cookies and cache for your site, then try the login page again.

Start with a private or incognito window and open your login page there. A private window uses no saved cookies, so a login that works there points at stale cookies in your normal browser. If the private window also loops, the cause sits on the server, and you can skip to the address check below.

  1. Close every tab that shows your site.
  2. Clear cookies for your exact site address, not for all sites.
  3. Clear the browser cache for the same address.
  4. Close the browser fully, reopen it, and try wp-login.php again.

In Chrome, open More > Delete browsing data, choose a time range, tick Cookies and other site data, and click Delete data, as shown in Google's Chrome cookie help. Safari users can remove one site under Safari > Settings > Privacy > Manage Website Data, per Apple's Safari guide.

The WordPress login troubleshooting guide lists clearing cookies first and clearing the cache second. It also notes that some firewalls block WordPress logins, so turn off a personal firewall briefly and test again if the loop continues (see the login troubleshooting guide).

The cookies handbook adds that after moving a website, you should delete your cookies and clear the server cache to solve temporary issues like this.

If a cached copy of the login page keeps loading, the fix looks done when it is not. Read our guide on fixing changes that do not show on your site if cached pages keep confusing your tests.

How do you fix a WordPress Address and Site Address mismatch?

Set both addresses to the exact address you use in your browser, including https and www.

WordPress stores 2 addresses on the Settings > General screen: “WordPress Address (URL)” is where the core files live, and “Site Address (URL)” is the address people type to reach the site.

If either one disagrees with the address in your browser, the login cookie is set for one address and read on another, so the loop is almost certain.

Both settings should include the https:// part and should not have a slash at the end, according to the WordPress migration handbook. Since you cannot reach Settings > General while locked out, add the correct values to wp-config.php above the line that reads “That’s all, stop editing!”:

define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

Replace example.com with your own address, using the exact https and www choice your visitors use. Note that hard-coding these values means you cannot edit them on the General settings page anymore, so remove the lines once you can log in and set the addresses there instead.

SettingWhat it controlsMust match
WordPress Address (URL)Where WordPress core files liveYour real site address
Site Address (URL)Address visitors type inYour real site address
Schemehttp or httpsThe scheme you actually use
wwwWith or without wwwThe version you actually use

How do you find a plugin that redirects the login page?

Deactivate every plugin, test the login, then switch plugins back on one at a time.

Security, login, redirect, membership, and caching plugins can all send you back to the login form before the dashboard loads. A caching plugin must never store wp-login.php or anything under /wp-admin/, because a stored copy of the login page cannot hold your fresh login cookie.

If you cannot reach the dashboard, use FTP or your host file manager and rename the wp-content/plugins folder to plugins_old. WordPress then treats every plugin as off. The common WordPress errors guide gives this exact method for plugin trouble when the admin screens are out of reach.

  1. Rename wp-content/plugins to plugins_old and try to log in.
  2. If login works, rename the folder back to plugins.
  3. Reactivate one plugin at a time, logging out and in after each one.
  4. When the loop returns, the last plugin you switched on is the cause.

Keep that plugin off and look for a replacement or an update. Our guide to finding abandoned WordPress plugins helps you check whether a suspect plugin is still maintained before you trust it again.

How do you fix a broken .htaccess file?

Rename the file, test the login, then let WordPress build a fresh one from Settings > Permalinks.

The .htaccess file is how Apache handles settings for each folder, and WordPress uses it to handle pretty permalinks.

A redirect rule left behind by a plugin or an old domain change can catch the login request and send it back to the login page as a fresh visit, which looks exactly like a refresh loop.

Back up the file first, then rename it to .htaccess_old in your site root by FTP or your host file manager.

The common WordPress errors guide calls a corrupted .htaccess file the most likely cause of an Internal Server Error and gives the same rename step, followed by a visit to Settings > Permalinks to generate a new file (see the common WordPress errors guide).

If the login works with the file renamed, WordPress will build a standard file for you. The default single-site block from the WordPress .htaccess handbook is:

# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Log in, open Settings > Permalinks, and click Save Changes twice to rebuild the rules. If the loop returns only after you restore your old file, a custom rule inside it is the cause, so add your old rules back one block at a time.

A 500 error after the same change points the same way, and our 500 error fix guide covers that case.

Apache notes that .htaccess files change settings for one folder and its subfolders, and that a bad directive in one can break the site, so test each restored block on its own (see the Apache .htaccess tutorial).

How do you fix an HTTPS or reverse-proxy redirect loop?

Make WordPress and your proxy agree on HTTPS before you force admin logins over SSL.

This cause is likely when the loop started right after you added SSL, moved hosts, changed domains, or added a CDN or proxy. The browser connects over HTTPS, but WordPress sees plain HTTP from the proxy, so each side keeps redirecting the other and the login never settles.

WordPress warns that a site behind a reverse proxy that provides SSL, while WordPress itself runs without SSL, will send requests into an infinite redirect loop unless WordPress is set to recognize the HTTP_X_FORWARDED_PROTO header, according to the WordPress HTTPS handbook.

Ask your host or proxy provider to confirm that header is set correctly.

The FORCE_SSL_ADMIN constant forces all logins and all admin sessions to happen over SSL when set to true in wp-config.php. Only use it when SSL is already working on the server. The older FORCE_SSL_LOGIN constant was deprecated in WordPress 4.0, so use FORCE_SSL_ADMIN instead, as of November 2026.

If you use Cloudflare, check the SSL mode there too, since a flexible SSL setting in front of a plain HTTP origin creates the same loop. Our Cloudflare redirect loop fix walks through that exact case.

Compare the SSL modes before you change anything. Our Cloudflare SSL settings guide shows what each mode does.

How do you check that the login loop is fixed?

Log in from a fresh private window and confirm you reach the dashboard without seeing the login form twice.

A fix is not confirmed until a clean browser session works. Your normal browser may still hold a good cookie from an earlier test, which hides a loop that is still there for everyone else.

  • Open a private window and log in at your exact site address.
  • Confirm the dashboard loads and the address bar stays on the same address.
  • Log out, close the window, and log in again the same way.
  • Try both the www and non-www versions if you use one of them.

If every test lands on the dashboard, the loop is fixed. If only one address version works, your site addresses still disagree, so repeat the address fix with the working version.

When should you contact your host?

Contact your host when the loop continues after you have cleared cookies, fixed the addresses, and turned off every plugin.

At that point the cause is almost certainly on the server: server cache, proxy headers, SSL setup, or file rules you cannot see. Tell the host exactly what you already tried and when the loop started, including any move, SSL change, or plugin update just before it.

Ask the host to check 3 things:

  • whether the server or CDN caches wp-login.php
  • whether the proxy passes the HTTPS header WordPress needs
  • whether any server redirect rule touches /wp-admin/

The WordPress errors guide also advises contacting your host when the site itself is down or a database limit is hit, since those are hosting issues rather than settings you can fix (see the common WordPress errors guide).

If you have no FTP or hosting panel access at all, contact the host first instead of last, because most of the fixes above need file access.

What mistakes should you avoid?

Do not leave temporary fixes in place, and do not edit files you have not backed up.

  • Do not leave RELOCATE in wp-config.php after a move, since it lets the site address change from the login URL.
  • Do not leave update_option lines in your theme functions.php file after the site is back, since they run on every load.
  • Do not delete .htaccess without saving a copy first.
  • Do not edit WordPress core files to fix a login problem.
  • Do not turn off SSL forcing to hide a proxy problem instead of fixing the proxy setting.

Frequently asked questions

Why does WordPress send me back to the login page without an error?

WordPress sends you back when the login cookie does not stick, so the dashboard cannot confirm you logged in. A wrong password shows an error message instead. Stale cookies, a site address mismatch, a redirecting plugin, a bad .htaccess rule, or a proxy HTTPS problem can each break the cookie step. Work through them in that order, starting with clearing cookies in a private window.

Can a caching plugin cause the WordPress login page to refresh?

Yes. If a caching plugin or a CDN stores a copy of wp-login.php, you may keep seeing the stored login form instead of a fresh logged-in page. Clear the plugin cache and the server cache, then check that the login page and the wp-admin area are excluded from caching. If the loop stops when caching is off, the cache settings were the cause.

I changed my site address and now I cannot log in. What do I do?

Add the correct addresses to wp-config.php with WP_HOME and WP_SITEURL, placed above the line that reads That is all, stop editing. Use the exact address visitors use, including https and the www choice. Save the file, then try the login page again. Once you can log in, set the addresses on the Settings General screen and remove the lines from wp-config.php.

Why does login work in a private window but not in my normal browser?

A private window starts with no saved cookies, so it gets a fresh login cookie. Your normal browser may hold a stale or damaged cookie for the site that fails checks and bounces you back to the login form. Clear cookies and cache for your exact site address, close the browser fully, and try again. If that fixes it, the browser was the whole problem.

Should I edit wp-config.php to fix a login loop?

Yes, but only for the two address lines or the SSL constant, and only after you back up the file. WP_HOME and WP_SITEURL fix an address mismatch, and FORCE_SSL_ADMIN forces logins over SSL once SSL works. Do not add other lines you found in a forum without checking what they do, and remove any temporary lines once you can log in again.

How long does it take to fix a login page that keeps refreshing?

Clearing cookies takes about 2 minutes and fixes the browser cases. An address fix or a plugin test takes 10 to 30 minutes, including finding the right file by FTP. A proxy or SSL problem can take longer because it needs your host or CDN provider to check headers and redirects. If you have no file access, allow extra time for host support.

Sources

  1. Cookies WordPress Developer Resources
  2. Troubleshoot login issues WordPress.org
  3. Migrating WordPress WordPress Developer Resources
  4. Apache HTTPD / .htaccess WordPress Developer Resources
  5. HTTPS WordPress Developer Resources
  6. Common WordPress errors WordPress Developer Resources
  7. Delete, allow, and manage cookies in Chrome Google Chrome Help
  8. Apache HTTP Server Tutorial: .htaccess files Apache HTTP Server Documentation

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test