All posts
Blog

Can't Log In to WordPress? 9 Fixes for wp-admin Login Problems

By Dakshesh7 min read

  • wp-admin
  • wordpress errors
  • wordpress security
Continue with GoogleFree plan · No credit card required

Listen to this article

9 minute listen

Narrated by an AI voice · 14 chapters

0:00-8:39

AI Overview

If you can't log in to WordPress, the cause is usually a forgotten password, a login page that just refreshes, blocked cookies, a security plugin lockout or a changed login URL. Here is how to find which one it is and get back into wp-admin, even without email access.

Key takeaways

  • Match the fix to the symptom: wrong password, login page refreshing, cookie error, lockout, 404 or blank page.
  • Without email, reset the password from your host panel, from phpMyAdmin with MD5, or with WP-CLI.
  • A login page that reloads usually means blocked cookies, a site address mismatch or a cached wp-admin.
  • Rename a security plugin folder over SFTP to get past a lockout or a moved login URL.
  • A missing or changed admin account can mean the site was hacked, so check before restoring access.

Free WordPress plugin

Know which plugin update broke your site.

The free MyKavo plugin watches your site through every plugin, theme and core update, and tells you which one caused a change, before your visitors find it.

  • Records every plugin, theme and WordPress update
  • Checks your key pages right after each update and names the one that broke something
  • One-click rollback when an update goes wrong, free
  • Changes, alerts and before-and-after proof inside wp-admin

Free on WordPress.org · WordPress 6.2+ · PHP 7.4+ · The check after each update comes with every paid plan

Summarize with AI

Opens the assistant in a new tab with a link to this post.

On this page

Few things are more stressful than being locked out of your own website. You type your username and password, and WordPress either says they are wrong, sends you back to the login page, or shows nothing at all.

Login problems almost always have one of a handful of causes. This guide covers each of them, starting with the most common, so you can get back into wp-admin quickly.

First, identify what you see#

The fix depends on the symptom:

  • "The password you entered is incorrect": a password problem. Start with fix 1.
  • The login page reloads with no error: a cookie, URL or cache problem. See fixes 3 to 5.
  • "Cookies are blocked or not supported by your browser": see fix 3.
  • "Too many failed login attempts" or you are locked out: a security plugin. See fix 6.
  • wp-login.php or /wp-admin returns a 404 error: the login URL was changed. See fix 7.
  • A blank page or "There has been a critical error": a PHP error. See fix 8.

1. Reset your password#

Click Lost your password? on the login page and enter your username or email. WordPress emails a reset link.

If the email never arrives, your site may not be able to send mail. Check spam first, then use one of the methods below.

2. Reset the password without email#

From the hosting panel. Many hosts include a WordPress manager (Softaculous, a WordPress toolkit or the host's own dashboard) with a button to change the admin password or log in directly.

From phpMyAdmin.

  1. Open phpMyAdmin from your hosting panel and select the site's database.
  2. Open the users table (wp_users, or another prefix shown in wp-config.php).
  3. Edit your user row. In user_pass, choose the MD5 function and type a new password.
  4. Save, then log in with the new password.

WordPress still accepts an MD5 password stored this way and replaces it with a modern, secure hash the first time you log in.

With WP-CLI. If you have SSH access, run wp user update youruser --user_pass="new-password" from the site's folder.

Free WordPress plugin

Update WordPress without the guesswork.

The free MyKavo plugin watches your site through every plugin, theme and core update, and tells you which one caused a change, before your visitors find it.

  • Records every plugin, theme and WordPress update
  • Checks your key pages right after each update and names the one that broke something
  • One-click rollback when an update goes wrong, free
  • Changes, alerts and before-and-after proof inside wp-admin

Free on WordPress.org · WordPress 6.2+ · PHP 7.4+ · The check after each update comes with every paid plan

WordPress needs a cookie to keep you logged in. If the browser blocks it, the login page simply reloads.

  • Clear cookies for your site, or try a private window.
  • Make sure the browser allows cookies for the domain.
  • If the error says "Cookies are blocked due to unexpected output", a PHP file is sending text before WordPress sets the cookie. This is usually a blank line or space before the opening php tag in wp-config.php or in a theme's functions.php. Remove it.

4. Fix a login page that keeps redirecting#

If you log in and land back on the login page, check the site address. Under Settings > General, the WordPress Address and Site Address must match how you reach the site, including https and www. If you cannot reach Settings, add these lines to wp-config.php with your real address:

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

A mismatch between http and https, or www and non-www, is a common cause after moving the site or adding an SSL certificate. Our guide to ERR_TOO_MANY_REDIRECTS covers redirect loops in more depth.

5. Clear the cache#

A caching plugin, your host's cache or a CDN such as Cloudflare can serve a cached copy of the login page or wp-admin. Exclude /wp-admin and wp-login.php from caching, purge the cache, and try again.

6. Get past a security plugin lockout#

Security plugins lock accounts or IP addresses after failed attempts, and some add login rules that break after an update. If you are locked out:

  1. Connect with SFTP or your host's file manager.
  2. Go to wp-content/plugins and rename the security plugin's folder, for example wordfence to wordfence-off.
  3. Log in, then rename the folder back and fix the plugin settings.

The same trick works for any plugin that breaks the login page, including two-factor authentication plugins if you lost your second factor.

7. Find a changed login URL#

Some security plugins move the login page to a custom address, so /wp-admin and wp-login.php return a 404 error. Check your password manager or old emails for the custom URL. If you cannot find it, disable the plugin by renaming its folder as in fix 6, and the default wp-login.php works again.

8. Fix PHP errors on the login page#

A blank page or a critical error message means PHP crashed, often after a plugin, theme or PHP update. WordPress emails the admin a recovery mode link that lets you log in with the broken plugin paused. Our guides to the critical error and the white screen of death explain the steps.

9. Check that your account still exists#

If nothing works, check the wp_users table in phpMyAdmin. If your user is gone or its role has changed, someone else may have access to the site. That is a sign of a hacked site: see our WordPress hacked guide before doing anything else.

How to avoid getting locked out#

  • Keep your password in a password manager and make sure site email works, so password resets arrive.
  • Save your custom login URL if a plugin changes it.
  • Keep a second admin account for emergencies, with a strong password.
  • Back up the site regularly so a broken update is easy to undo. See our WordPress backup guide.
  • Watch for unexpected changes, such as new admin users or plugins nobody installed.

Know when something changes#

Many login problems start with a change: a plugin update, a new security rule, a moved site address or an unknown admin account. The free MyKavo WordPress plugin records plugin, theme, core and PHP changes on your site, and MyKavo alerts you when your important pages start failing or change unexpectedly. You find out what changed before you are stuck at the login screen.

Frequently asked questions#

Frequently asked questions

Why can't I log in to my WordPress site?

The most common causes are a forgotten password, blocked cookies, a site address mismatch that sends you back to the login page, a security plugin lockout, a changed login URL or a PHP error after an update.

How do I log in to WordPress if I forgot my password and email does not work?

Use your host's WordPress manager to reset the password, or open phpMyAdmin, edit your user in the users table and set user_pass to a new password with the MD5 function. WordPress upgrades it to a secure hash when you log in.

Why does the WordPress login page keep refreshing?

Usually a cookie problem or a site address mismatch. Clear cookies, check that the WordPress Address and Site Address match the address you use, including https and www, and exclude wp-admin from caching.

How do I get into wp-admin when a security plugin locked me out?

Rename the plugin's folder in wp-content/plugins over SFTP or the file manager. WordPress disables it, you can log in, and then you rename it back and fix its settings.

What is my WordPress login URL?

By default it is yoursite.com/wp-admin or yoursite.com/wp-login.php. If those return a 404 error, a security plugin has moved the login page to a custom address.

Can a hacked site stop me from logging in?

Yes. Attackers sometimes change the admin password, delete accounts or add their own admin user. If your account is missing or changed, treat the site as compromised and clean it before restoring access.

Share this post

Write for MyKavo

Know website monitoring, WordPress or SEO from real work? Pitch us a guide. You keep a byline with one link to your site. Read the guidelines

Get alerted when your site breaks. Free, no card.

Start free