keepcalculator

06 Numbers and Powers

Locked Out of WordPress Admin? Fix It Now

Card No. 06·30308 · Updated · Standard formula, shown below

Being locked out of your WordPress admin dashboard is a frustrating experience, but it’s almost always fixable. This guide walks you through the most common causes—forgotten passwords, plugin conflicts, theme errors, and corrupted files—and provides clear, step-by-step solutions to regain access. You’ll need FTP access or a file manager in your hosting control panel, and possibly access to your hosting account’s database management tool (like phpMyAdmin).

What You’ll Need

  • FTP client (like FileZilla) or your hosting provider’s file manager.
  • Your hosting control panel login (cPanel, Plesk, etc.).
  • Access to phpMyAdmin or similar database tool (usually in your hosting control panel).
  • A text editor (like Notepad or Sublime Text) for editing files.
  • Patience and a backup of your site (if you have one).

Step-by-Step

  1. Try the “Lost your password?” link. Go to your WordPress login page (usually yoursite.com/wp-login.php). Click the “Lost your password?” link and enter your username or email. If you receive a reset email, follow the instructions. If not, move on to the next step.
  2. Check your email spam folder. Sometimes the password reset email ends up in spam or is blocked by your email provider. Look for an email from your site’s address. If you don’t see it, proceed to the next step.
  3. Deactivate all plugins via FTP. A plugin conflict is a common cause of login issues. Connect to your site via FTP or file manager. Navigate to /wp-content/plugins/. Rename the entire plugins folder to plugins_old. This deactivates all plugins. Try logging in again. If it works, the issue was a plugin. Rename the folder back to plugins and then rename individual plugin folders (e.g., akismet to akismet_off) one by one, testing login each time, to isolate the culprit.
  4. Switch to a default theme via FTP. A broken theme can also cause lockouts. Navigate to /wp-content/themes/. Rename your active theme’s folder (e.g., twentytwentyfour to twentytwentyfour_old). WordPress will automatically fall back to a default theme (like Twenty Twenty-Four). Try logging in again. If successful, your theme was the problem.
  5. Reset your password directly in the database. If the above steps fail, you can manually reset your password. Log into your hosting control panel and open phpMyAdmin. Select your WordPress database (usually prefixed with wp_). Find the wp_users table and click “Browse”. Find your username row and click “Edit”. In the user_pass field, delete the existing value and enter a new password using the MD5 function. In the dropdown next to the field, select MD5. This will hash the password correctly. Click “Go” to save. Now try logging in with your new password.
  6. Disable any security plugins or .htaccess rules. Security plugins can sometimes block your IP address or cause redirect loops. If you have a security plugin, deactivate it via FTP (as in step 3) by renaming its folder. Also, check your .htaccess file in the root directory. You can temporarily rename it to .htaccess_old to see if that resolves the issue. If it does, you’ll need to regenerate it by going to Settings > Permalinks in your admin dashboard (once you’re back in).
  7. Repair corrupted files. If your WordPress core files are corrupted, you may experience lockouts. Download a fresh copy of WordPress from wordpress.org. Unzip it and upload the wp-admin and wp-includes folders via FTP, replacing the existing ones. Do not overwrite wp-content or wp-config.php. This will replace core files without touching your content.
  8. Check your wp-config.php file. A misconfigured wp-config.php can cause issues. Open it in a text editor and verify that the database name, username, password, and host are correct. Also, check for any stray spaces or characters before the <?php tag.

Common Mistakes

  • Not checking the spam folder. Always check spam before moving to more complex fixes.
  • Deleting files instead of renaming. Renaming is safer because you can easily revert changes.
  • Editing the database without a backup. Always back up your database before making any changes.
  • Using the wrong database table prefix. If your prefix isn’t wp_, you’ll need to adjust the table name in phpMyAdmin.
  • Forgetting to clear your browser cache. Sometimes a cached page is the reason you can’t see the login form. Try a different browser or incognito mode.

Tips

  • Use a strong, unique password and store it in a password manager.
  • Enable two-factor authentication (2FA) for an extra layer of security.
  • Regularly back up your site (files and database) so you can restore it quickly if needed.
  • Keep WordPress, themes, and plugins updated to avoid conflicts and security vulnerabilities.
  • Consider using a security plugin that offers login lockdown features, but configure it carefully to avoid locking yourself out.

Troubleshooting

If you’ve tried all the steps above and still can’t get in, here are a few more things to try:

  • Check if your site is in maintenance mode. If you see a “Briefly unavailable for scheduled maintenance” message, delete the .maintenance file from your root directory.
  • Verify your database connection. If you get a “Error establishing a database connection” message, check your wp-config.php credentials and make sure your database server is running.
  • Contact your hosting provider. They may be able to help you reset your password or restore a backup. They can also check server logs for errors.
  • Use a plugin to reinstall WordPress core. If you have access to a plugin like “WP Reinstall” (via FTP), you can reinstall core files without losing content. This is a less manual version of step 7.
  • Check for malware. If your site has been hacked, you may be locked out. Scan your site with a security plugin (if you can access one) or ask your host for help.

Frequently Asked Questions

I forgot my username, what can I do?

You can find your username in the wp_users table in phpMyAdmin. Look for the user_login column. You can also ask your hosting provider to help you locate it.

Why am I getting a redirect loop when trying to log in?

This is often caused by a misconfigured .htaccess file or a caching plugin. Try renaming .htaccess to .htaccess_old and clearing your browser cache. If that doesn’t work, deactivate all plugins via FTP.

My login page just refreshes, no error message. What’s wrong?

This usually indicates a session or cookie issue. Try clearing your browser cookies, using a different browser, or adding the following to your wp-config.php file (before the “That’s all, stop editing” line): define('WP_HOME', 'http://yoursite.com'); define('WP_SITEURL', 'http://yoursite.com'); (replace yoursite.com with your actual domain).

Can I reset my password without FTP or phpMyAdmin?

If you have access to your hosting control panel, you can often use a tool like “WordPress Toolkit” (in cPanel) to reset the admin password. Otherwise, you’ll need FTP or database access.

I’m locked out because of a security plugin. How do I get back in?

Rename the security plugin’s folder via FTP (as described in step 3). This will deactivate it and allow you to log in. Once in, you can reconfigure the plugin or choose a different one.

What if my site has been hacked and I’m locked out?

First, contact your hosting provider immediately. They may be able to restore a clean backup. You can also try reinstalling WordPress core files (step 7) and then scanning for malware once you’re back in. If you have a backup, restore it.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →