A laptop on a round table showing a padlock and the word Secured, with a small plant and a clock nearby.

How to fix a WordPress login that isn’t working

Locked out of your own website? It’s almost always fixable, usually without touching any code. Work out your symptom first, then follow the matching fix.

You type your username and password, click Log In, and nothing happens. Or the page just reloads. Or your browser says the page “isn’t redirecting properly”. Being locked out of your own website is stressful.

When your WordPress login isn’t working, don’t keep resetting the password. That only helps if the password was the problem. Start with a private browser window and the exact login address. Then match what you see to the table below. A page that reloads, or a “too many redirects” error, usually comes down to cookies, a plugin, caching or your site’s address settings, not your password.

AdvertisementLooking after and fixing your website · Article topAdvertise here

Key takeaways

  • Try a private window and the exact login address, such as https://yourdomain.co.uk/wp-login.php.
  • Wrong password or username? Use “Lost your password?”.
  • Page keeps reloading, or ERR_TOO_MANY_REDIRECTS? Clear cookies, rule out plugins and caching, then check your Hypertext Transfer Protocol Secure (HTTPS) and site address settings.
  • No reset email? Fix your site’s email, or reset the password through your host or another administrator.
  • Once you’re back in, add free, optional protection such as two-factor login.

Which symptom do you have?

What you see Most likely cause Go to
“The password you entered is incorrect” or “unknown username” Wrong details, or an old saved password Reset the password
The login page reloads and you’re back where you started Cookies, site address settings, caching or a plugin The page keeps reloading
“Too many redirects” or “isn’t redirecting properly” Site address or HTTPS settings, or a content delivery network (CDN) The page keeps reloading
“Cookies are blocked or not supported by your browser” Browser cookies, or inconsistent HTTPS Try a private window
“There has been a critical error” or a blank white page A broken plugin or theme, not your login Our critical error guide
“Error establishing a database connection” A database or hosting problem Contact your host

Try a private window and the exact login URL

Start here whatever your symptom. These checks take two minutes and can’t break anything.

Use the right address. Your login page is normally your domain followed by /wp-login.php. Going to /wp-admin while logged out should take you there too. Use exactly the version your site normally uses, with the same https and the same www (or no www). Logging in on one version while the site lives on another can stop your browser keeping you logged in.

If a security plugin has moved your login page, the usual address may show “page not found”. Check your notes or set-up emails for the custom address.

Try a private window. Private or incognito windows start without your saved cookies or most extensions.

  • It works there: the problem is in your normal browser. Clear the cookies and cache for your site, or switch off extensions one at a time.
  • It fails everywhere: the problem is on the site itself. Read on.

Check you’re on the right site. A WordPress.com login is separate from a self-hosted WordPress site. Your hosting account and domain registrar have their own logins too.

Reset the password

If WordPress says the password or username is wrong:

  1. Check Caps Lock, and whether your password manager is filling in an old password. You can also log in with your account’s email address instead of the username.
  2. Click Lost your password? on the login page.
  3. Enter your username or email address.
  4. Open the email WordPress sends and choose a new password.
  5. Check your spam folder if it doesn’t arrive within a few minutes.

If you’ve tried many times, wait before trying again. Some security plugins lock you out for a while after several failed attempts.

WordPress admin login not working? The page keeps reloading or says too many redirects

If you enter the right details and land straight back on the login page, or see ERR_TOO_MANY_REDIRECTS, WordPress’s guidance points to a handful of causes. Work through them in order.

  1. Clear your cookies for the site. WordPress uses cookies to remember you’re logged in, and broken ones can cause a loop. Clear them for your site only, close the browser and try again.
  2. Rule out a plugin. A security, caching or login plugin can cause the loop. In your host’s file manager, go to wp-content and rename the plugins folder to plugins_old, then try logging in. If it works, rename the folder back and reactivate plugins one at a time until you find the culprit. Our critical error guide explains this step in more detail.
  3. Check caching. WordPress advises that the login page should never be cached. If you use a caching plugin, or your host or CDN caches pages, check that wp-login.php is excluded. Then clear the cache.
  4. If you use Cloudflare, its documentation says redirect loops are often caused by the Flexible Secure Sockets Layer/Transport Layer Security (SSL/TLS) encryption mode. With Flexible, Cloudflare talks to your server over plain http, your server sends visitors back to https, and round they go. Cloudflare suggests switching to Full or Full (strict), which needs an SSL certificate on your server.

WordPress login not working after a URL change

Login loops often start right after a change of address: a new domain, a move from http to https, or switching between www and no www. WordPress stores your address in two settings, WordPress Address and Site Address. If they don’t match where your site actually is, logins can fail.

If you can reach the dashboard, check Settings > General and make sure both addresses are correct and identical, including https.

If you can’t get in, WordPress’s guidance lets you set the address in wp-config.php, in your site’s main folder:

  1. Download a copy of wp-config.php first.
  2. Above the line that says “That’s all, stop editing!”, add these two lines with your real address:

define( 'WP_HOME', 'https://yourdomain.co.uk' ); define( 'WP_SITEURL', 'https://yourdomain.co.uk' );

  1. Save the file and try logging in.

While those lines are there, they take priority over Settings > General. Once everything works, you can leave them or correct the settings and remove them.

If the site has moved domain, old addresses may be stored throughout the database. WordPress recommends a careful search-and-replace after making a copy of your site. It’s fiddly by hand, and your host’s support team can often help.

If you can’t get a password-reset email

If “Lost your password?” sends nothing, your site probably has an email problem. It’s often the same issue that stops contact forms working. Our guide to a contact form that isn’t sending email explains how to fix the mail itself. In the meantime, you can still get back in another way:

  • Through your hosting control panel. Many hosts let you reset a WordPress password there. Search your host’s help pages for “reset WordPress password”.
  • Through another administrator, who can set a new password under Users > All Users.
  • Through WP-CLI, if you have command-line access. WordPress documents a password-reset command.
  • Through phpMyAdmin, as a last resort. WordPress documents this but warns you to use it at your own risk.
  • By asking your host’s support team to reset it for you.

Once you’re in: make the login harder to break into

None of these makes a site impossible to break into, but together they help.

  1. Use a strong, unique password. The UK’s National Cyber Security Centre suggests three random words. Use a separate password for the email account linked to your site, since anyone with that email can reset your WordPress password.
  2. Add two-factor authentication with the free Two-Factor plugin on WordPress.org.
  3. Use one security plugin, not several. Overlapping login plugins are a common cause of lockouts.
  4. Tidy your users. Remove accounts nobody uses and give everyone the lowest role they need.
  5. Save your recovery details. Write down your login address and keep two-factor backup codes somewhere safe.

FAQ

Why does my WordPress login page just refresh? Usually because of cookies, a plugin, caching or mismatched site address settings. Work through the “keeps reloading” steps in order.

How do I fix ERR_TOO_MANY_REDIRECTS on WordPress? Clear your cookies first. Then check your plugins, your caching and, if you use Cloudflare, its SSL/TLS mode. Finally, check that both addresses in Settings > General match your real https address.

Is it safe to edit wp-config.php? Yes, if you download a copy first and change only what’s described. If anything goes wrong, put the copy back.

What to do now

Open a private window and go straight to https://yourdomain.co.uk/wp-login.php. If that doesn’t work, find your symptom in the table and follow that section only. Once you’re back in, save your login address and set up two-factor login so it’s easier next time. If the whole site is down, not just the login page, start with the critical error guide instead.

Sources

  • WordPress Developer Resources, “Logging in”: https://developer.wordpress.org/advanced-administration/security/logging-in/
  • WordPress.org, “Reset your password”: https://wordpress.org/documentation/article/reset-your-password/
  • Cloudflare Docs, “ERR_TOO_MANY_REDIRECTS”: https://developers.cloudflare.com/ssl/troubleshooting/too-many-redirects/
  • WordPress.org, Two-Factor plugin: https://wordpress.org/plugins/two-factor/
  • NCSC, “Three random words”: https://www.ncsc.gov.uk/blog-post/three-random-words-or-thinkrandom-0
  • NCSC, “Use a strong and separate password for email”: https://www.ncsc.gov.uk/collection/top-tips-for-staying-secure-online/use-a-strong-and-separate-password-for-email

Photo: Dan Nelson on Pexels

AdvertisementLooking after and fixing your website · Article bottomAdvertise here