WordPress Log In: What To Do When You Can’t Get In
Being locked out of your WordPress log in is one of those things that feels urgent the moment it happens. The site is right there, you can see it, but the admin dashboard is completely out of reach. Before you do anything drastic, most lock-out situations come down to a handful of causes, and most of them have a straightforward fix. This guide walks through each one in plain English, in roughly the order you should try them.
On this page
Wrong Credentials Are the Most Common Cause
It catches more people out than you’d expect. WordPress usernames are case-sensitive. If your username is Simon with a capital S, typing simon in lowercase will fail every time. Passwords follow the same rule. Before going any further, check that caps lock is off and that you’re typing into the correct field.
Also check that you’re pointing at the right login URL. The standard WordPress login page sits at yoursite.com/wp-admin or yoursite.com/wp-login.php. Some security plugins move the login page to a custom address. If that applies to your site, the standard URL will return a 404 with no explanation.
Try the Password Reset First
If you can’t remember your password, the reset link on the login page is the cleanest starting point. Click “Lost your password?”, enter your username or account email address, and WordPress sends a reset link. Check both your inbox and your spam folder, because it often ends up there.
If that email never arrives, the problem is usually your server’s mail configuration rather than WordPress itself. Many hosting setups don’t have outgoing mail configured properly from the start. When that’s the case, you need to go a level deeper.
Reset Your Password Through phpMyAdmin
When the email route fails, you can reset your password directly in the database. Log in to your hosting control panel (cPanel or equivalent), open phpMyAdmin, and select your WordPress database.
Open the wp_users table (the prefix may differ if it was changed during setup), find your username, and click Edit. In the user_pass field, select MD5 from the function dropdown and type your new password into the value field. Save the row. That password is now active. Head back to /wp-admin and log in with it.
This feels technical the first time, but it’s a standard procedure and you’re not breaking anything. Think of the database as a very structured spreadsheet and it becomes far less daunting.
Create a New Admin User via FTP
If phpMyAdmin isn’t available, you can create a fresh admin account by editing a theme file directly over FTP. Connect to your server using an FTP client, navigate to your active theme folder inside wp-content/themes/your-theme/, and open functions.php.
Add the following snippet to the top of the file, just below the opening <?php tag:
add_action('init', function() {
if (!username_exists('tempuser')) {
$id = wp_create_user('tempuser', 'ChangeMe123!', 'temp@yourdomain.com');
wp_update_user(['ID' => $id, 'role' => 'administrator']);
}
});
Save the file, visit any page on your site to trigger the code, then log in with those credentials. Once you’re in, go straight to Users, update your original account or create a permanent one, and remove that snippet from functions.php. Do not leave it there. If you want a clearer picture of how WordPress site structure affects security and stability, the technical work happening beneath a WordPress site is often what separates a solid setup from a fragile one.
A Security Plugin May Have Locked You Out
Several security plugins, including Wordfence and Limit Login Attempts, block an IP address after a set number of failed login attempts. If you’ve been trying repeatedly and can no longer see the login form at all, this is a likely cause.
To fix it, temporarily disable the plugin via FTP. Go to wp-content/plugins/ and rename the plugin’s folder, for example from wordfence to wordfence-disabled. WordPress deactivates it automatically. Log in, rename the folder back, and reactivate it from the Plugins screen. Your IP should be cleared once you’re back inside.
When a White Screen Appears Instead of the Login Page
A white screen on the login page usually points to a PHP error rather than a credentials problem. This often happens after a plugin update or a PHP version change at the server level.
Enable WordPress debug mode by editing wp-config.php over FTP. Find the line that reads define('WP_DEBUG', false); and change false to true. Reload the page and you’ll see an actual error message rather than a blank screen, which tells you exactly what needs fixing. Slow or broken admin pages can be a separate matter entirely, and knowing what makes a WordPress site drag helps you rule out performance-related causes quickly.
Before You Start Trying Everything at Once
Some of these fixes need server access that most people don’t have close to hand. If your host doesn’t offer phpMyAdmin or FTP access, or if you’re on a managed platform with restricted file access, the steps above may not be straightforward. In that case, your host’s support team is the fastest path forward. They can reset credentials at the server level far more quickly than any plugin or workaround.
If you can’t login to WordPress, getting back in is almost always possible. Work through each option methodically rather than trying several things at once. Otherwise it becomes very hard to tell what actually fixed it.