One of the most common issues I’ve faced is a “WordPress Locked Out Issue” in my WordPress admin area. This can be not easy to troubleshoot, especially for beginners like me.
I’m here to guide you through fixing the “WordPress locked out” issue. I’ll show you what to do when you’re locked out of the WordPress admin (wp-admin) so you can regain access to your site.
Why Am I Locked Out of WordPress Admin?
I often hear from users needing help getting locked out of their WordPress admin area. This frustrates them because it halts productivity—they can’t write posts, respond to comments, or manage their site. If you cannot log in to someone else’s WordPress self-hosted site, contact the site owner for assistance. They can clarify why access is restricted and help resolve the issue.
Causes of Being Locked Out of WordPress Admin
1. Wrong Login URL
Sometimes, you might see a message saying, “This has been disabled,” which usually means you try logging in using the wrong URL. This often happens if a custom login URL has been set up for security purposes, and you still need to remember it.
2. Incorrect Password
If your password doesn’t work and you can’t reset it through the recovery email, the issue might be with your site’s email system. This prevents the recovery email from being sent, leaving you locked out.
3. Lost Administrator Privileges
Sometimes, you can log in but no longer have administrator privileges. This means you can only occasionally perform critical tasks on your site due to changes made by someone with access or a possible hack.
4. Too Many Login Attempts
Security plugins often lock users out after too many failed login attempts to protect the site from unauthorized access. This can inadvertently prevent you from logging in.
5. White Screen of Death (WSoD)
A blank white screen, often called the “White Screen of Death,” can appear due to plugin issues or insufficient PHP memory. This makes it impossible to access your admin panel.
6. Database Connection Error
Error establishing a database connection” indicates a problem with your WordPress database. It suggests that WordPress can’t connect to the MySQL database, which stops your site from loading properly.
7. Syntax Error
A “Parse error: syntax error” message means incorrect code in your site’s files, usually from recent changes or copied code that contains errors. This prevents the site from functioning correctly.
Method 1 | How to fix the Wrong Login URL
Step-by-Step Guide to Fixing the Wrong Login URL Issue
When you try to log in to your WordPress site and see a message like “This has been disabled,” it usually means you are using the wrong login URL. Here’s a detailed guide to help you restore access.
Step 1: Access Your Website Files via Hosting
- Find Your Hosting Credentials: Log in to your hosting account and locate your website whose wordpress is locked out. These are usually found in the main dashboard of your hosting. Now, go to the Website file manager.
Step 2: Navigate to Your Plugin Folder
- Locate Your WordPress Directory: You’ll see a list of files and folders once connected to your server. Find your WordPress folder. This is usually named after your website or something like “public_html” or “www.”
- Find the wp-content Folder: Inside your WordPress directory, find and open the “wp-content” folder.
- Open the Plugins Folder: Within the “wp-content” folder, open the “plugins” folder. This folder holds your site’s plugins.
- Identify the Security Plugin: Look for the plugin’s folder that customizes your login URL. Standard plugins for this purpose include Wordfence or other security plugins.
- Rename the Plugin Folder: Right-click on the security plugin folder name and select “Rename.” Add “-disabled” to the end of the folder name.
Step 3: Log In to Your WordPress Admin
- Access the Default Login URL: With the security plugin deactivated, you can now try accessing your WordPress admin panel using the default login UR:
yoursite.com/wp-admin
oryoursite.com/wp-login.php
.
- Log In with Your Credentials: Enter your WordPress username and password to log in to your wordpress admin panel.
Step 4: Reactivate the Security Plugin
- Return to the Plugins Folder: Go back to hosting and navigate to the “plugins” folder within “wp-content.”
- Rename the Plugin Folder Back: Right-click on the security plugin folder you renamed and change the name back to its original.
- Verify Plugin Activation: Log in to your WordPress admin and reactivate the plugin.
Method 2 | How to Reset Password in WordPress
If your password doesn’t work and the password recovery option fails to send you a recovery email, the issue might be with your site’s email system. Here’s a detailed guide to help you reset your password and regain access.
Step 1: Access Your Website Files via Hosting
- Access your hosting account and find the website whose WordPress you are locked out of. These credentials are usually found in the main dashboard of your hosting account.
- Navigate to the Website file manager.
Step 2: Navigate to phpMyAdmin
- Look for the phpMyAdmin option in your hosting control panel. This tool allows you to manage your website’s database.
- Click on phpMyAdmin to open it.
Step 3: Locate Your WordPress Database
- phpMyAdmin shows a list of databases on the left. Find your WordPress database.
- . The database name often starts with your website or hosting account username.
- Click on the database name to open it.
Step 4: Edit the Users Table
- Within your WordPress database, find and click on the table named wp_users. This table stores all of your site’s user information.
- In the
wp_users
table, locate the row corresponding to your admin username. Click on the “Edit” option next to this row.
Step 5: Reset Your Password
- In the Edit screen, look for the
user_pass
field. This field contains your password in an encrypted format. - Delete the current value in the
user_pass
field and enter your new password. - Next to the
user_pass
field, there is a dropdown menu labeled “Function.” Select “MD5” from this menu. This will encrypt your new password using the MD5 algorithm.
Step 6: Access Your WordPress Admin
- Go to your WordPress admin login page, usually found at
yoursite.com/wp-admin
oryoursite.com/wp-login.php
. - Enter your username and the new password you just set in phpMyAdmin. You should now be able to log in to your WordPress admin panel.
By following these steps, you should be able to reset your password and regain access to your WordPress admin panel if you were locked out due to an incorrect password and failed email recovery.
Method 3 | How to Fix Lost Administrator Privileges
If you can log in but no longer have administrator privileges, this could be due to malicious activity or changes made by someone with access to your site. Here’s a detailed guide to help you restore your administrator privileges.
Step 1: Access Your Website Files via Hosting
- Access your hosting account and find the website for which you’ve lost administrator privileges. These credentials are usually found in the main dashboard of your hosting account. (steps mentioned above)
- Navigate to the Website file manager.
Step 2: Navigate to phpMyAdmin
- Look for the phpMyAdmin option in your hosting control panel. This tool allows you to manage your website’s database.
- Click on phpMyAdmin to open it. (steps mentioned above)
Step 3: Locate Your WordPress Database
- Find your WordPress database in phpMyAdmin. The database name often starts with your website or hosting account username.
- Click on the database name to open it.
Step 4: Create a New User with Administrator Privileges
- Within your WordPress database, find and click on the table named wp_users. This table stores all of your site’s user information.
- Click “Insert” to add a new user. Fill in the following fields:
- ID: Choose a unique number that has yet to be taken by one of the other users on your site. For example, if you have five users, your new user should at least be number six.
- Click “Go” to save the new user.
user_login: The username for your new administrator account. user_pass: The password for the new user. Select “MD5” from the function dropdown to encrypt the password. user_nicename: A nickname for the user. user_email: The email address for the account. user_url: Your website’s URL. user_registered: The current date. user_status: Should be set to 0. display_name: The name you want to be displayed on your website for this user. |
Step 5: Assign Administrator Privileges
- Find and click on the table named
wp_usermeta
in your WordPress database. This table stores metadata for all the users on your site. Click on the “Insert” tab to add new metadata for your new user. Fill in the following fields:
unmeta_id: Leave this blank. user_id: The ID number of the new user you created. meta_key: Enter wp_capabilities .meta_value: Enter a:1:{s:13:"administrator";b:1;} to give administrator capabilities. |
- Click “Go” to save.
- Repeat the process to add another row with the following:
unmeta_id: Leave this blank. user_id: The ID number of the new user you created. meta_key: Enter wp_user_level .meta_value: Enter 10 to set the user level to administrator. |
- Click “Go” to save.
Step 6: Access Your WordPress Admin
- Enter the username and password for the new administrator account you just created. You should now have full administrative privileges.
- Access your WordPress login, usually at yoursite.com/wp-admin or yoursite.com/wp-login.php.
- Enter the username and password for the new administrator account you just created. You should now have full administrative privileges.
Method 4 | How to Fix Being Locked Out Due to Too Many Login Attempts
Security plugins can lock users out after too many failed login attempts to protect the site from unauthorized access. This can inadvertently prevent you from logging in. Here’s a detailed guide to help you regain access.
If you’re facing this problem, it is similar to the issue described in Method 1. Please refer to Method 1 for detailed instructions on turning off the security plugin and regaining access to your WordPress admin panel.
Method 5 | How to Troubleshoot the White Screen of Death (WSoD)
Step-by-Step Guide to Fixing the White Screen of Death Issue
The “White Screen of Death” (WSoD) is a common issue that presents as a completely blank white screen, often due to plugin conflicts or insufficient PHP memory. Here’s how to fix the WSoD.
Step 1: Access Your Website Files via Hosting
- Access your hosting account and find the website experiencing the WSoD. These credentials are usually found in the main dashboard of your hosting account. (steps mentioned above)
- Navigate to the Website file manager. (steps mentioned above)
Step 2: Disable All Plugins
- Find your WordPress folder on the server. This is usually named after your website or something like “public_html” or “www.”
- Inside your WordPress directory, find and open the “wp-content” folder. (steps mentioned above)
- Open the ” plugins ” folder within the “wp-content” folder. This folder contains your site’s plugins.
- Rename the “plugins” folder. Change the name to “plugins-disabled.” This action will deactivate all plugins because WordPress won’t recognize the renamed folder. (steps mentioned above)
Step 3: Check Your website
- Refresh your website to see if the WSoD is resolved. If you can access your site now, it means one of the plugins was causing the issue.
- To reactivate your plugins, rename the “plugins-disabled” folder back to “plugins.” Then, deactivate them from the WordPress admin panel to identify the problematic plugin.
Step 4: Increase PHP Memory Limit
- If disabling plugins doesn’t resolve the WSoD, you may need to increase the PHP memory limit.
- In the file manager, locate the “wp-config.php” file in your WordPress directory.
- Open the “wp-config.php” file for editing.
- Add the following line of code before the line that says “
define('WP_MEMORY_LIMIT', '128M');
- Save the changes to the “wp-config.php” file.
Step 5: Check for Theme Issues
- If increasing the memory limit doesn’t fix the WSoD, the issue might be with your theme.
- In the “wp-content” folder, find and open the “themes” folder.
- Right-click on the folder of your active theme and select “Rename.” Add “-disabled” to the end of the folder name.
- This action will force WordPress to revert to a default theme.
- Reload your website. If it is, the problem lies with your theme.
Step 6: Restore Your Site from a Backup
- If none of the above steps resolve the WSoD, consider restoring your site from a recent backup.
- Most hosting providers offer backup and restore options in their control panel.
- Restore your site from a backup.
These steps should fix the WSoD.
Final Words
Dealing with being locked out of your WordPress admin panel can be frustrating and disruptive, especially when you have important tasks to complete on your site. However, with the detailed step-by-step guides provided above, you can troubleshoot and resolve the most common causes of this issue.
Whether you need to reset a forgotten password, restore administrator privileges, turn off security plugins, or fix the infamous White Screen of Death, Each method helps you regain access fast. Remember to keep your WordPress site updated and regularly back up your data to minimize the risk of such issues in the future.
If you encounter problems you cannot resolve alone, Contact your host for help.