What's WP
Our everything is about WordPress - best choice of WordPress users!
How to Deal with the Locked Out Issue of WordPress Admin

How to Deal with the Locked Out Issue of WordPress Admin

If you are a webmaster of the WordPress based website, it is possible that you may encounter the locked out issue of your admin. Once this happens, you will find that you cannot access the administrative panel of your WordPress site without knowing what is wrong. Frankly speaking, this can upset you a lot and may even lead to the sense of panic. This time, we’d like to talk about this problem and introduce you some tips on how to deal with the locked out issue of WordPress admin.

In fact, there might be a lot of reasons that prevent you from accessing your website back-end. However, we have summarized some of the key reasons in the following.

  • The wrong admin password or username.
  • The white screen of death error.
  • The failure of the database connection.
  • The loss of admin privileges.
  • The PHP errors.

Here, we will discuss these popular errors and introduce how to fix them to resolve the admin locked out issue.

Wrong Admin Password and Username

If you want to access the admin panel, you have to enter the correct password and username. However, it is possible that you have already typed the right login credential, you still cannot log in successfully. If you are looking to reset your website password by clicking the Forget Password link, this does not work and you can never receive the email leading you to the password reset page. If this happens, it is possible that your site is already hacked.

What You Should Do

Now, what you need to do is to change the admin password or reset the username to the totally new ones. The resolution might be a little bit overwhelming for newcomers. However, with the use of the phpMyAdmin, you can handle the switch easily.

For this, you only need to enter your account of phpMyAdmin from your control panel. And then, you should target the right database if you have created multiple options. From the database, you can find a lot of tables that store the data of different parts of your site. Here, you should click the wp_users table.

After hitting the Browse button, you can check all the user information. Now, you simply should click the edit buttons for user_pass and user_login to enter the values for your new password and new username with ease.

Change WordPress Password

White Screen of Death Error

The issue of white screen is another common reason that may lock you out of your admin. Once this happens, you can find nothing but a white screen in your administrative panel. This error usually happens because of the exhausted consumption of your server memory, the conflict among some poorly coded templates and plugins, the unreliable service of the web hosting, the corruption of the website database and some others.

What You Should Do

If you are unable to access the admin due to this issue, then, you have to resolve this problem by carrying out the below practices.

  • Deactivate all your plugins to figure out whether the issue is caused by the installed plugins. You can do this by deleting the plugins folder using the FTP or the control panel. Note that even the disabled plugins may cause this issue, so you cannot only remove the activated options.
  • Deactivate all your templates as you do to your plugins. This can figure out whether the problem lays on the themes. Or, you can reverse to the default WordPress theme.
  • Increase the memory limit from the wp-config.php file.
  • Resort to the DE_BUG feature of WordPress.

Failure of the Database Connection

It is possible that you will see an error message for database connection when you log to your WordPress admin. This means WordPress fails to establish the connection for this practice. Thus, you cannot enter the script admin successfully.

As for the reasons for leading to this issue, we have summarized some as below.

  • The database server is not responsive and goes something wrong.
  • The database login information has been changed.
  • The whole database is corrupted.
  • The web server is in the wrong situations.

What You Should Do

Here, as the problem is caused by the database issue, you need to repair your database. For doing so, you can enter the following line into the wp-config.php file to proceed the repair.

Database Repair Code

Next, you can enter the database repair page by entering the suffix of “maint/repair.php” next to the URL of your WordPress login.

Database Repair Page

From this page, you can click the repair button to start the recovery and the optimization. Here, if the issue is resolved, you should remember to remove that line of coding stuff from your website configuration file.

In addition to this step, you also need to check the login settings of your database in the wp_config.php file. Especially, you should do this when you have switched the hosting provider and have changed your database name or the user information.

The detailed steps for this can be found from this how-to tutorial.

Loss of Admin Privileges

It is possible that you can enter the WordPress admin successfully. However, once entering, you cannot find any admin functionality. This means you are unable to edit the posts, adjust the whole site settings, install the new plugins, change the current template and do something else.

If this occurs, it means you are encountering the hacking issue and the hackers have already removed the admin privileges of you.

What You Should Do

Now, you have to add a new admin to take the full control of your site back. For this, you can use the phpMyAdmin. After entering this special database tool, you should hit on the wp_users table. And then, you can click the Insert link to add the new information for your admin user and click the Go button.

  • Pick up an ID number that will not be repetitive with other users.
  • Enter the username and the password you will use to access the website dashboard.
  • Enter a nickname if you want to refer to yourself.
  • Offer an email address that is related to this account and your website URL.
  • Select the date and time when this user is registered properly.
  • Set the status tab to 0.

Insert New User

After that, you should hit on the wp_usermeta tab and then press the Insert link. Here, you can leave the umeta ID field blank as it can be created automatically. The user ID part should be the ID number you have created from the previous step. The meta key should be the option of wp_capabilities. As for the meta value, you should enter the line just like the following.


After clicking the Go button, you should create another new row of the wp_usermeta tab. However, the difference is that the meta key for this one needs to be wp_user_level and the meta value should be 10.

Now, the new administrator role is generated already and you can use it to access to your WordPress site with the admin privilege.

PHP Errors

The last possible reason for the admin locked out issue is the PHP error. Especially, if you have added some lines of code into your website files improperly, you may fail to enter the WordPress admin.

What You Should Do

If you know what you have added into which file, you can remove the new code using the FTP or the file manager. If you are the newcomer and do not know where the bad code is, you need to use your backup file to reverse the whole site into the previous edition.


Susan Rose is a freelance writer who has a deep knowledge about WordPress. She loves everything related to website building since the freshman year at Christopher Newport University, and loves to share her experience with people all over all the world. This girl is popular among our readers as she is outgoing and energetic. In the daily life, Susan loves detective novels as it can train her logical thinking and creativity.


Want to Learn More About WordPress?

Get Our Free Themes, Plugins, Support, SEO Tips, and Other Tutorials!

Email *