Getting locked out of the WordPress admin area is terrifying. Just imagine: You’ve just woken up to a great new idea for your WordPress blog. Hurriedly, you turn on your computer and login to your WordPress admin or wp-admin screen. To your horror, you find that you’re locked out of the WordPress admin account. Suddenly, a million dreadful thoughts start swirling in your mind – Did someone hack my site? Did I do something to break it? Can the issue even be resolved?
And as scary as the situation might seem, we are here to tell you it’s going to be fine. All you need to do is to calm down and follow the steps in this WordPress tutorial, where you will learn how to fix locked out of your WordPress admin issue and regain access.
Table of Contents
Common Causes Why You May Be Locked Out of WordPress
Typically, being locked out of WordPress isn’t caused by anything particularly malicious. For instance, your site might be having a problem connecting to the database. Another reason why you might be locked out can be related to website migration from one domain to another. But that isn’t to say that all reasons of being locked out of WordPress are as innocent. You could also be a victim of a hack, where the hackers might have changed your password. We will explore all these cases, and discuss the optimal solution for each.
Option 1 – Incorrect WordPress Password or Username
You are sure that you are entering the username and password for your WordPress admin account correctly, even though you are getting an error. You decide to reset your password, but you fail to receive any emails related to the issue. If all this sounds eerily familiar to you, chances are WordPress is failing to send emails. But don’t sweat just yet – what you need to do is reset your WordPress admin password through phpMyAdmin. As it is a somewhat lengthy procedure, we have prepared a detailed guide for you here. Similarly, if you’re username has been compromised, you can reset it as well by following this tutorial.
Option 2 – Incorrect WordPress URLs
Sometimes, you get locked out of the wp-admin screen if you’ve migrated your site over to a new domain name. This is due to an inconsistency between the MySQL database and the new URL. Because WordPress uses MySQL to store all your posts, profiles and configuration, it is necessary to make sure that MySQL database has your new domain name. If this the case, the solution lies in replacing the old URL with the new one in the MySQL database. See this tutorial on how to change WordPress URL in your MySQL database using phpMyAdmin.
Option 3 – Error Establishing Database Connection
Another common cause of being locked out of wp-admin is a bad database connection. It is probably the case if you are encountering the Error Establishing a Database Connection view on every page of your WordPress website. Essentially, WordPress is unable to establish a stable connection with your database, and as ya result, you see this error on your entire site. This could be caused by a number of things: problems with your web hosting service, corrupted database etc. As this is a quite common reason for being locked out of WordPress admin area, we’ve dedicated an entire tutorial on how to fix error establishing database connection on WordPress.
Option 4 – White Screen of Death
Finally, if you are unable to login to wp-admin because you are welcomed with a white screen on the login page, it means that you are suffering from a ‘white screen of death’ error. This is a known issue with WordPress, caused by various reasons, chief among which is exceeding the memory limit of WordPress. Another reason for the white screen of death is inefficient plugins or themes. If all else fails, check your error logs to trace the source of the problem. We recommend checking out our tutorial on how to fix the white screen of death error on WordPress.
Getting locked out of your own WordPress admin account can happen to anyone. Turns out, there are a number of fixes one could attempt at resolving the issue. In this tutorial, we saw some of the major causes why you may be locked out of WordPress:
- Incorrect WordPress password/username
- Incorrect WordPress URLs
- Error Establishing Database Connection
- The infamous ‘White Screen of Death’ error
Chances are your particular case fell in one of these 4 scenarios. If so, hopefully, you have taken care of the problem by following our instructions. For more tutorials and fixes related to WordPress, stay tuned to Hostinger Tutorials.