Getting locked out of WordPress admin (wp-admin) is a common issue, and it can happen for several reasons, from incorrect login credentials to security plugins blocking access. This can be a frustrating experience, especially if you need to make urgent updates to your website.
In this post, we’ll explain why you might be locked out of your WordPress dashboard and provide solutions to regain access.
Why Are You Locked Out of wp-admin?
Here are a few common reasons for being locked out of WordPress admin:
- Forgotten Password: You’ve forgotten or lost your password.
- Corrupt Login File: The login file could be corrupted.
- Plugin Conflicts: A faulty plugin might be preventing access.
- Security Plugins: Some security plugins may block your login attempts if they detect suspicious activity.
- Incorrect Permissions: File or folder permission issues can prevent access.
Step-by-Step Guide to Fix Being Locked out of WordPress admin
Step 1: Reset Your Password
If you’ve forgotten your password, the first step is to reset it.
- Go to the WordPress login page and click on Lost your password?.
- Enter your email address and follow the instructions to reset your password.
- Check your email for the password reset link.
Step 2: Disable Security Plugins
Sometimes, security plugins like Wordfence or iThemes Security may lock you out due to suspicious activity or multiple failed login attempts. You can disable these plugins to regain access.
- Access your website via FTP or your hosting provider’s file manager.
- Navigate to the wp-content/plugins folder.
- Rename the security plugin’s folder to deactivate it.
- Try logging into your WordPress dashboard again.
Step 3: Disable All Plugins via FTP
If disabling security plugins doesn’t work, another plugin might be causing the issue. You can deactivate all plugins to see if one is the culprit.
- Access your website via FTP.
- Navigate to wp-content/plugins.
- Rename the plugins folder to plugins_old. This will deactivate all plugins.
- Try logging into your WordPress dashboard.
Step 4: Fix File Permissions
Incorrect file permissions can prevent you from accessing your WordPress admin.
- Access your website via FTP.
- Right-click the wp-admin folder and set its permissions to 755.
- Do the same for the files inside the folder, setting them to 644.
Step 5: Create a New Admin User via phpMyAdmin
If you’re still locked out, you can create a new admin user via phpMyAdmin.
- Access your hosting control panel and open phpMyAdmin.
- Select your WordPress database and navigate to the wp_users table.
- Insert a new user with the following values:
- user_login: NewAdminUsername
- user_pass: NewPassword (make sure to use the MD5 function)
- user_nicename: Your name
- user_email: Your email
- user_registered: The current date
- user_status: 0
- Go to the wp_usermeta table and insert the following:
- user_id: The ID of the new user you just created
- meta_key: wp_capabilities
- meta_value: a:1:{s:13:”administrator”;b:1;}
- Log in with your new credentials.
Conclusion
Being locked out of wp-admin can be stressful, but by following the steps in this guide, you should be able to regain access. If you’re still having trouble, reach out to Craftwebx for expert WordPress support.