Fix WordPress Login Redirect Loop & Refreshing Issue: 6 Steps to Regain Access

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 .htaccess file – A damaged .htaccess can 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:

  1. Open your browser’s history or settings menu (for example, press Ctrl+H in Chrome).

  2. Look for Clear browsing data and select it.

  3. Tick the options for Cookies and other site data and Cached images and files.

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

  1. Connect to your server via FTP or your hosting File Manager.

  2. Download the wp-config.php file from the root of your WordPress installation.

  3. 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.com with your real domain.

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

  1. Connect to your website via FTP or the File Manager.

  2. Locate the .htaccess file in the root (/public_html) and download it as a backup.

  3. Delete the file (or rename it to .htaccess_backup).

  4. Try to log into WordPress. If the login succeeds, go to Settings → Permalinks and click Save without changing anything. WordPress will create a fresh .htaccess for 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:

  1. Use FTP or File Manager to navigate to the wp-content folder.

  2. Rename the plugins folder to something like plugins_backup. This tells WordPress that no plugins are active.

  3. Attempt to log into your site. If you succeed, the problem lies within one of your plugins.

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

  1. Connect via FTP and navigate to wp-content/themes.

  2. Rename your active theme’s folder (for example, append _old to its name).

  3. WordPress will automatically fall back to the default theme available on your site.

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

  1. If you have a caching plugin like WP Rocket, W3 Total Cache or LiteSpeed Cache, go into its settings and deactivate caching.

  2. If you can’t log in, rename the caching plugin’s folder via FTP just like you did for plugins in Step 4.

  3. Clear any server‑side caches (for example, Varnish) from your hosting control panel.

  4. 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_HOME and WP_SITEURL when 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.

more insights

Get Proposal Form

Great! Let’s Find Out What’s Stopping Your Website From Performing at Its Best 🚀

🔍 We’ll Help You Identify What’s Holding You Back

You’ve already taken the first step — now let’s uncover what’s keeping your website from converting better. From slow load times to poor CTA placement, we’ll spot the bottlenecks and fix them.

💡 Why Are We Doing This For Free?

Because we know that once you see what a difference the right strategy makes, you’ll trust us for the execution too 😉
No obligations — just real, useful insights.

⚡ Let’s Get Started

Enter your details and we’ll send you a personalized audit within 24 hours — no spam, no fluff, just honest recommendations to make your site perform like it should.

Free Consultation Form (Yes/No Flow)

All good 😊 We’re glad you dropped by!
If you ever need a new website, Shopify store, or marketing help, reach out anytime at info@datronixtech.com.
Have a great day 🚀

Hey there 👋 Looking to build or grow your online presence?