One of the most common issues I’ve faced is “WordPress Locked Out Issue” of my WordPress admin area. This can happen due to various reasons, which can be challenging to troubleshoot, especially for beginners like me.
I’m here to guide you to tell you how to fix “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 who face the frustration of being locked out of their WordPress admin area. It’s frustrating because it halts productivity—you can’t write posts, respond to comments, or manage your site. If you’re unable to log in to someone else’s WordPress self-hosted site, you should contact the site owner or admin 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 are trying to log in using the wrong URL. This often happens if a custom login URL has been set up for security purposes, and you’ve forgotten 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
In some cases, you might be able to log in but find that you no longer have administrator privileges. This means you can’t perform critical tasks on your site, which is often 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 completely blank white screen, often called the “White Screen of Death,” can appear due to issues with plugins or insufficient PHP memory. This makes it impossible to access your admin panel.
6. Database Connection Error
An error message saying “Error establishing a database connection” indicates that WordPress can’t connect to the MySQL database. This stops your site from loading properly.
7. Syntax Error
A “Parse error: syntax error” message means there’s 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 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 just go to the Website file manager.
Step 2: Navigate to Your Plugin Folder
- Locate Your WordPress Directory: Once connected, you’ll see a list of files and folders on your server. Navigate to the folder that contains your WordPress installation. 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 contains all the plugins installed on your site.
- Identify the Security Plugin: Look for the folder of the plugin that handles your login URL customization. Common plugins for this purpose include Wordfence or other security plugins.
- Rename the Plugin Folder: Right-click on the folder name of the security plugin 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 URL:
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 earlier and change the name back to its original.
- Verify Plugin Activation: Log in to your WordPress admin panel and go to the “Plugins” section. Ensure that the plugin is reactivated and working correctly.
Method 2 | How to Reset Password in WordPress
If you find that 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
- Log in to your hosting account and locate 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
- In your hosting control panel, look for the phpMyAdmin option. This tool allows you to manage your website’s database.
- Click on phpMyAdmin to open it.
Step 3: Locate Your WordPress Database
- In phpMyAdmin, you will see a list of databases on the left-hand side. Identify the database that corresponds to your WordPress site. The database name often starts with your website name or your 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 the user information for your site. - In the
wp_users
table, locate the row that corresponds 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: Log In to 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 find that 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
- Log in to your hosting account and locate 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
- In your hosting control panel, look for the phpMyAdmin option. 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
- In phpMyAdmin, you will see a list of databases on the left-hand side. Identify the database that corresponds to your WordPress site. The database name often starts with your website name or your 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 the user information for your site. - Click on the “Insert” tab to add a new user. Fill in the following fields:
- ID: Choose a unique number that isn’t already 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: Log In to Your WordPress Admin
- Enter the username and password for the new administrator account you just created. You should now have full administrative privileges.
- Go to your WordPress admin login page, usually found at
yoursite.com/wp-admin
oryoursite.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 how to disable the security plugin and regain 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 a detailed guide to help you troubleshoot and resolve this problem.
Step 1: Access Your Website Files via Hosting
- Log in to your hosting account and locate 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
- Once connected, you’ll see a list of files and folders on your server. Navigate to the folder that contains your WordPress installation. 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)
- Within the “wp-content” folder, open the “plugins” folder. This folder contains all the plugins installed on your site. (steps mentioned above)
- Right-click on the “plugins” folder and select “Rename.” 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.
- Rename the “plugins-disabled” folder back to “plugins” to reactivate your plugins. Then, deactivate them one by one 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 PHP memory limit doesn’t resolve 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.
- Refresh your website to see if the issue is resolved. 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.
- Follow the instructions provided by your hosting provider to restore your site from a backup.
By following these steps, you should be able to troubleshoot and fix the White Screen of Death issue on your WordPress site.
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 it’s resetting a forgotten password, restoring administrator privileges, disabling security plugins, or fixing the infamous White Screen of Death, each method is designed to help you regain access quickly and efficiently. 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 any problems that you cannot resolve on your own, don’t hesitate to reach out to your hosting provider for support.