Getting locked out of your own site because the login page keeps refreshing or redirecting back to itself is incredibly frustrating. This problem—often called the WordPress login redirect loop or simply the WordPress login loop—happens when you enter the correct username and password but the system refuses to log you in. Instead, it reloads the login page over and over again, leaving you unable to reach your dashboard. If you’re trying to fix WordPress login redirect loop errors, this article will show you exactly what to look for.
Fortunately, this issue is usually caused by a few misconfigurations that are easy to fix. In this guide you’ll learn what causes the WordPress login loop, why it happens and, most importantly, how to resolve it so you can regain access to your admin area quickly. We’ll also point you to related resources, such as our guides on fixing WordPress server and database errors and fixing the WordPress white screen of death, in case you encounter other WordPress problems.
Why Does the WordPress Login Page Keep Refreshing?
Before you start troubleshooting, it helps to understand why the problem occurs. A login loop or page refresh happens when WordPress can’t complete the authentication process. WordPress maintenance experts highlight two primary culprits: incorrect site URL settings and issues with login cookies. When the site and WordPress addresses don’t match or cookies aren’t accepted, the platform validates your credentials but fails to set the cookie that keeps you logged in. As a result, WordPress redirects you back to the login screen.
Other factors can contribute to the loop:
Browser cache and stale cookies – Old data can cause WordPress to use outdated files or session information.
Corrupted or misconfigured
.htaccessfile – A damaged.htaccesscan interfere with redirects.Conflicting plugins or themes – A faulty plugin or theme may hijack the login process.
Incorrect WordPress address or site address – URL settings that don’t match your actual domain will cause redirects.
Aggressive caching plugins – Some caching layers interfere with the login cookie. Disabling the cache temporarily often resolves the issue.
By systematically checking these areas, you can identify the root cause and get back into your WordPress dashboard.
Step‑by‑Step Solutions
Follow the steps below in order. After each step, try to log in again. If the problem persists, move on to the next solution.
1. Clear Your Browser Cookies and Cache
WordPress relies on cookies for user authentication and caches web pages to improve performance. If your browser still stores old cookies or outdated cached files, it may cause the login loop. Clearing cookies and cache resets your session data.
Here’s how to do it in most browsers:
Open your browser’s history or settings menu (for example, press
Ctrl+Hin Chrome).Look for Clear browsing data and select it.
Tick the options for Cookies and other site data and Cached images and files.
Set the time range to All time and click Clear data.
After clearing the data, close your browser completely and then reopen it. Ensure that cookies are enabled for your site before attempting to log in.
2. Verify and Correct WordPress URL Settings
WordPress stores two important addresses: the Site URL and the WordPress URL. If these values are incorrect—perhaps because you migrated to a new domain or changed the permalink structure—the login form may loop endlessly. To fix the problem, make sure both addresses are correct in the General Settings screen of your dashboard.
If you can’t access the dashboard, you can fix the URLs directly in wp-config.php:
Connect to your server via FTP or your hosting File Manager.
Download the
wp-config.phpfile from the root of your WordPress installation.Add the following lines above the comment that reads
/* That's all, stop editing! Happy publishing */:define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');
Replace
https://example.comwith your real domain.Save the file and upload it back to your server.
These definitions override the database values and ensure WordPress uses the correct URLs. Try logging in again. If it works, remove the definitions and update the addresses from the dashboard (Settings → General) to make the changes permanent.
3. Restore the .htaccess File
A corrupted .htaccess file can trigger redirect errors. Many troubleshooting guides recommend deleting the faulty file and letting WordPress regenerate it. To do this:
Connect to your website via FTP or the File Manager.
Locate the
.htaccessfile in the root (/public_html) and download it as a backup.Delete the file (or rename it to
.htaccess_backup).Try to log into WordPress. If the login succeeds, go to Settings → Permalinks and click Save without changing anything. WordPress will create a fresh
.htaccessfor you.
If you see a second .htaccess file in the wp-admin directory, remove it as well.
4. Deactivate All Plugins
Conflicting or corrupted plugins are a frequent source of the login redirect loop. Because you can’t access the dashboard, you’ll need to disable all plugins at once via FTP:
Use FTP or File Manager to navigate to the
wp-contentfolder.Rename the
pluginsfolder to something likeplugins_backup. This tells WordPress that no plugins are active.Attempt to log into your site. If you succeed, the problem lies within one of your plugins.
Rename the folder back to
plugins. Then log into your dashboard, reactivate your plugins one by one and test the login each time until you find the culprit.
Some plugins provide login redirects (for example, membership or security plugins). If you identify one causing the issue, either update it, reconfigure its settings or find an alternative.
5. Switch to a Default Theme
Themes can also interfere with the login process, especially after a major WordPress update. Most troubleshooting guides advise temporarily reverting to a default theme like Twenty Seventeen to rule out theme problems. If you can’t access the dashboard, disable your current theme via FTP:
Connect via FTP and navigate to
wp-content/themes.Rename your active theme’s folder (for example, append
_oldto its name).WordPress will automatically fall back to the default theme available on your site.
Try to log in. If you regain access, your theme is the issue. Update it or contact the developer for a fix. You can reinstall the theme later and test again.
6. Disable Caching Plugins and Browser Caches
Some caching plugins modify how pages are served, which can interfere with login cookies. Troubleshooting guides note that caching plugins may cause the login refresh problem, so you should temporarily disable them. To do this:
If you have a caching plugin like WP Rocket, W3 Total Cache or LiteSpeed Cache, go into its settings and deactivate caching.
If you can’t log in, rename the caching plugin’s folder via FTP just like you did for plugins in Step 4.
Clear any server‑side caches (for example, Varnish) from your hosting control panel.
Try logging in again. Once resolved, enable caching and adjust its settings to prevent interference with sessions.
Preventing Future Login Loops
Once you’ve regained access, take steps to minimize the chances of getting locked out again:
Keep WordPress core, plugins and themes up to date. Updates often include bug fixes and security patches.
Check URL settings after migrations. Always verify
WP_HOMEandWP_SITEURLwhen moving your site.Limit plugin usage. The more plugins you have, the greater the chance of conflicts. Only install what you need and choose reputable developers.
Use a reliable caching setup. If you run a caching plugin, make sure it’s configured to respect logged‑in sessions.
Maintain regular backups. Having a current backup allows you to restore your site quickly if something goes wrong.
Ensure browser cookies are accepted. Encourage site members to enable cookies and clear their browser cache periodically.
FAQs About the Login Redirect Loop
Why does my WordPress login page keep refreshing? The most common reason is incorrect site URL settings or problems setting the login cookie. Stale browser data, corrupted .htaccess files, and conflicting plugins are other frequent causes.
How do I update WordPress URLs when I can’t access the dashboard? Edit the wp-config.php file and add define('WP_HOME','https://your-domain.com'); and define('WP_SITEURL','https://your-domain.com'); above the “stop editing” comment. Replace the domain with your own, upload the file and try logging in.
What if clearing cookies doesn’t work? If clearing cookies and cache doesn’t solve the problem, proceed to check your URL settings, restore the .htaccess file, and disable plugins and themes. Often a corrupted .htaccess or a conflicting plugin is the real cause.
How can I identify which plugin is causing the issue? Disable all plugins by renaming the plugins folder. If you can log in, reactivate plugins one by one until the issue returns. The last plugin activated before the error reoccurs is likely responsible.
Can a caching plugin cause login problems? Yes. Caching plugins sometimes serve cached login pages or interfere with session cookies. Disabling or reconfiguring the caching plugin usually solves the problem.



