What To Do When You’re Locked Out Of WordPress Admin

It is exceedingly frustrating when your WordPress admin account is locked out. What’s worse, there’s typically no button to take you back to the login screen. If you go back via the URL, it will redirect you to an error message. This means you cannot add posts, publish content, install or update plugins, or anything else. In this tutorial, we go over what to do when you’re locked out of WordPress admin. We will explain why your WordPress admin account is locked and how to get it unlocked differently. Let’s get started!

Incorrect Login Credentials

Using the incorrect login credentials will lock your admin account. That is, assuming you tried multiple times to log in but were unsuccessful. The solution is resetting your password via the “Lost your password?” button or the WP-cli. If you are a system admin, you already know that resetting the password with the MD5 hash generator directly into the MySQL database with a MySQL query is possible. If you are unfamiliar with any of these, contact your hosting provider.

Losing Administrator Privileges

Losing Administrator Privileges means the system admin or site owner revoked your admin rights. Another possible reason is if WordPress is hacked, and the hacked renames or deletes your admin user account. If everything is OK with WordPress, the solution is to have your admin access rights returned. Otherwise, if WordPress is hacked, you must create a new admin user account with wp-cli or directly into the database. Then, try to log in again and double-check the list of users to detect any suspicious users. Then, delete the list to avoid a similar scenario.

Incorrect WordPress URL

The incorrect WordPress URL may also lock the WordPress admin account. If you recently cloned your website from testing to production, the login URL in the database needs to be updated. The change can be made directly into the database table with Query or via phpMyAdmin if you are familiar. Again, if you are a regular user and do not have experience, please contact your technical support.

Too Many Login Attempts

Too many login attempts happen due to brute force attacks. This happens when hackers try to guess your password and gain access to your WordPress admin dashboard. In this case, the WordPress security plugins block the IP address of the attacker. This can sometimes lock the WordPress login to make the WordPress more secure. This is a great mechanism to prevent attacks, but the outcome is a locked WordPress account, which is not good. The solution for this is logging on to your server via SSH or SFTP and disabling the security plugin you are using to limit the login attempts to reaccess your admin dashboard.

Error Establishing Database Connection

The error “Establishing Database Connection” is caused when the database service is stopped. It may stop due to insufficient RAM on your server, insufficient disk space, or due to corrupted files, or crashed database tables. To start the service, you will need to upgrade the plan for more RAM, or if there is no disk space, you need to delete some unnecessary files or folders. If there are crashed tables, you must log in to your MySQL and repair them. If you are using shared hosting, you need to contact the hosting provider to increase the database connections, as another possible solution. Once you complete these actions, you can reaccess your Website.

Plugin Issues

The plugin issues are very often issues, especially when you install a new plugin or update the existing one. The outcome may be the parse syntax error on your screen when trying to access the website. One of the possible solutions is to log in to your server via SSH or SFTP and disable the plugin by renaming the plugin folder from “plugin-name” to “plugin-name_old,” for example. It is worth trying to rename the existing .htaccess file and create a new one since there may be some incorrect lines of code for the culprit plugin.

White Screen of Death (WS)

The white screen of death is an issue that can have multiple causes. There are no messages in the logs; there is nothing on the screen except a white screen. The possible solutions are the following:

Check the web and database services to see if they are up and running. If they are, restart them and try to access the website.

The next step is to log in to the server and check the PHP_MEMORY limit value. If it is the standard one, you can increase it twice or triple it. In case your website is still not accessible, you can disable ALL plugins. If you manage to access the website, you can start enabling the plugins one by one to detect the culprit.

The other possible solution is to disable the theme and try to use the predefined WordPress themes.

You must contact your hosting provider if none of these solutions solve the issue.

That’s it. You learned some essential ways to get back in if you’ve been locked out of WordPress admin. Of course, if you have an issue with getting out of lock mode, you can always contact technical support.

Leave a Comment