You type your username and password, click Log In, and the page just refreshes. No error, no dashboard, only the login form again. If your WordPress login page keeps refreshing or redirecting back to login, you have probably been locked out by a cookie, cache or URL problem, not by a wrong password. The good news is that your content is safe, and the loop can usually be fixed in a few minutes.
This guide explains why the WordPress login page keeps refreshing and gives you 10 proven steps to fix it, even when you cannot reach the dashboard.

Why does the WordPress login page keep refreshing?
When you log in, WordPress sets a cookie in your browser to remember that you are signed in. If that cookie is not saved, is blocked or is invalid, WordPress sends you back to the login page every time. Many different problems can interfere with that cookie, and they are listed below.
| Cause | Typical clue | Fix |
|---|---|---|
| Old cookies or cache | It works in a private window or another browser | Clear cookies and caches |
| Mismatched site addresses | It began after a migration, SSL or domain change | Make both addresses identical |
| Unexpected output in a file | You may see: Cookies are blocked due to unexpected output | Remove spaces before the opening tag |
| Plugin or theme conflict | It began after an update or a new plugin | Disable plugins and test a default theme |
| Cached login page | A caching plugin, host or CDN stores wp-login.php | Exclude login and admin from caching |
| HTTPS or .htaccess problem | Mixed http and https, or redirect rules | Fix HTTPS and reset .htaccess |
| Security plugin settings | A custom login address or login limits | Check or disable the security plugin |
Before you start
- Take a backup of your files and database.
- Try a private window and a different browser. This tells you whether the problem is local.
- Get file access. You need FTP or your host’s File Manager, because the dashboard is not available.
- Remember what changed last. An update, a new plugin, a code edit or a new SSL certificate is usually the trigger.
How to fix the WordPress login page refreshing: 10 steps

Step 1: Clear your browser cookies and cache
Clear cookies and cached files for your website, restart the browser and try again. Make sure your browser accepts cookies for the site, and temporarily turn off extensions that block cookies or scripts.
Step 2: Test another browser, device or network
If the login works on your phone or in a private window, the problem is in your original browser. If it fails everywhere, the cause is on the site or the server, so continue with the next steps.
Step 3: Check the WordPress Address and Site Address
A mismatch between these two settings, such as one using http and the other using https, or one with www and one without, often causes a login loop. You cannot open Settings, General without logging in, so set them in wp-config.php, above the line that says to stop editing:
define( 'WP_HOME', 'https://yourwebsite.com' );
define( 'WP_SITEURL', 'https://yourwebsite.com' );Replace the example with your real address and make sure it matches how your site is reached. Our guide to fixing too many redirects explains more about address and HTTPS conflicts.
Step 4: Look for unexpected output
If you see the message that cookies are blocked due to unexpected output, a PHP file is sending something before WordPress can set the cookie. The usual cause is an extra space or empty line before the opening PHP tag in wp-config.php, functions.php or a plugin file, especially after a manual edit. Check the files you edited most recently, remove anything before the opening tag and save the file as plain UTF-8 without a BOM.

Step 5: Reset the .htaccess file
Connect with FTP or File Manager, show hidden files and rename .htaccess to .htaccess-old. If you can log in afterwards, go to Settings, Permalinks and click Save Changes so WordPress writes a fresh file. The standard rules are in our guide to fixing the WordPress internal server error.
Step 6: Disable all plugins
Rename the plugins folder in wp-content to plugins-off and try to log in. If you can, a plugin is the cause. Rename the folder back and reactivate plugins one at a time. Check security, login, two-factor, caching and membership plugins first, because they interact with login cookies.
Step 7: Switch to a default theme
Rename your active theme’s folder inside wp-content/themes so WordPress falls back to a default theme. If the login works, the problem is in your theme, often in functions.php. Look at recent code changes there.
Step 8: Exclude the login pages from caching
A cached login page can send you in circles. In your caching plugin, your host’s cache settings and your CDN rules, exclude /wp-login.php, /wp-admin/ and the REST API from caching. On a store, also exclude the account, cart and checkout pages. Then clear every cache.

Step 9: Check HTTPS and cookie settings
Make sure your site uses one consistent version, with https if you have an SSL certificate. If you have added custom cookie or SSL settings to wp-config.php, such as COOKIE_DOMAIN or FORCE_SSL_ADMIN, check that they match your real domain, or remove them to test. If your site is behind a proxy or CDN, the HTTPS detection steps in our redirect guide may also apply.
Step 10: Check for a hack, then restore a backup or ask your host
If the login loop appeared together with strange redirects, unknown admin users or changed files, your site might be hacked. Follow our WordPress security checklist to clean it. Otherwise restore a recent clean backup, or ask your host to check the server logs, file permissions and security rules.
What if you can log in but are logged out again quickly?
A session that keeps ending is usually caused by a caching rule that treats logged-in users like visitors, a security plugin that limits sessions, a server time that is wrong, or a mismatch between www and non-www versions of the site. Check your cache exclusions, test with plugins disabled and make sure only one version of your domain is used.
How to prevent login problems
- Keep your WordPress Address and Site Address identical and consistent with your SSL setup.
- Never cache login, admin or account pages.
- Edit code with a proper editor and never leave spaces before the opening PHP tag.
- Test plugin and theme updates on a staging site.
- Use login limits and two-factor authentication for security, and test them after changes.
- Keep a recent backup, and know how to rename the plugins folder by FTP.

When to ask an expert for help
Ask for help if you cannot reach your files, if you are locked out of a live store or client site, or if you suspect a hack. At wpXpart we fix login problems, restore access, clean hacked sites and set up safer logins. See our WordPress maintenance services and security solutions, or hire a WordPress expert.
Frequently asked questions
Why does the WordPress login page refresh without an error?
The login itself may succeed, but the cookie that keeps you signed in is not saved or accepted, so WordPress sends you back to the login page. Cookies, cache, site addresses and unexpected output are the usual reasons.
Is my password wrong?
Usually not. A wrong password normally shows an error message. A silent refresh points to a cookie or redirect problem.
Can a caching plugin cause the login loop?
Yes. If the login page or admin pages are cached, WordPress cannot set the right cookie. Exclude them from caching.
What does cookies are blocked due to unexpected output mean?
It means a PHP file sent output, such as a space or empty line, before WordPress sent its cookie. Remove anything before the opening PHP tag in the recently edited files.
Can I fix the problem without dashboard access?
Yes. Use FTP or File Manager to edit wp-config.php, reset .htaccess, rename the plugins folder or switch the theme.
Will I lose content?
No. The loop affects login only, not your posts, pages or media.
Could a security plugin lock me out?
It can, if it changed the login address, limited login attempts or blocked your IP. Rename the plugin’s folder to disable it temporarily, then review its settings.
How long does it take to fix?
Many cases take minutes. Server, firewall or CDN problems may take longer and may need help from your host.
Related guides
Keep learning with these step-by-step guides from our team.
- How to Fix Too Many Redirects in WordPress: break the redirect loop.
- WordPress Security Checklist: 20 Steps: protect your site from hackers.
- How to Fix the WordPress Internal Server Error: solve the 500 error.
- How to Fix Mixed Content in WordPress: bring back the padlock.
Conclusion
To fix the WordPress login page refreshing, clear cookies and caches, match your site addresses, remove unexpected output, reset .htaccess, test plugins and themes, exclude login pages from caching and check HTTPS. Work through the steps in order, and you will usually find the cause quickly and get back into your dashboard.
Locked out? Start a project with wpXpart and we will restore access to your WordPress site.
Need help with your WordPress site?
Tell us about your project and get a clear, written proposal.
Stay tuned with our latest updates
Subscribe for practical WordPress tips and news.






















