It can be a very frustrating situation when you locked out WordPress admin screen even when you don’t know the exact problem of getting logged out.
It is crucial to find out the problem as quickly as possible because downtime for your website is actually not good for your customers as they might have a bad user experience i.e. UX.
Actually, there are so many reasons for such type of situation. The major problem can be because they will not be able to access the admin screen. Also, there are some more scenarios that are most common.
Thus it becomes important to find out the solution and establish it quickly. However, with some patience and your dedicated time, you will be able to find a solution to this problem and can make your website running again.
Best Solutions for Accessing a Locked Out WordPress Admin Screen
1. Through your phpMyAdmin change the password
The very first reason that you might be logged out from WordPress admin can be because you might be using such tools that limit you for login attempts. After entering the wrong password and user name you might not be able to access your WordPress dashboard.
So in this situation, you must first try to reset the password which is possible from the admin login screen.
If you are not able to do this because you didn’t get an email reset password then another option that you have is to reset the password with the help of phpMyAdmin.
To make this possible you will have to go to your web hosting and login into it. From the site, the screen finds out the related site the click on it to get access to the overview screen. Here you can find out your WordPress database’s link.
From the left sidebar of your phpMyAdmin, you will be able to find the database and you can expand this with the help of the + plus symbol. By click on the + sign, you will be able to access the list of all tables that contains your database.
By clicking on the browser link you can also open the table.
Now click on the Edit next to your username once the wp-users table gets loads.
After this replace the text that is in the user_pass field
In this field, an encrypted password is present that must be replaced with the new password. And in function drop-down set the encryption to MD5.
Now click on the go which will save all the changes and now go back to your website.
2. To avoid “white screen of death’ make use of FTP
A white screen of death means a white blank screen that does not shows any error message. This will make your task much more difficult. However, you will be able to find so many common causes also the solution to fix this problem.
To access your server you can make use of the File Transfer protocol. And check out the following
Check the themes and plugin for corruption or errors.
Enable the debug mode. By doing this you will be able to find if it showcases the errors while you access your website.
Increase the limit of your PHP memory with the wp-config.php file.
If you are not able to solve this problem then to fix this issue and access the WordPress website you will have to connect with your host and tell them all the options you have tried to access WordPress admin
Related Post: Best Way to Protect WordPress Admin Area From Spam/Malware/Hack
3. Ensure if the database credential you have all are correct
The main reason that your website displays in the first place and consists of comments, pages, posts, etc is because of your WordPress database.
The error which occurs while database connection can be because of the following reason.
- The fault might have developed due to the site server
- There is the possibility that the problem is occurred due to your database
- The wp-config.php might have inaccurate database details
- Irrespective of the cause, locked out WordPress admin screen completely that is important to resolve as soon as possible.
Your very first action should be to check if the database details are correct or not. In your wp-config file, this is stored via an FTP file.
By log into the server, in the text editor open that file and check for the other lines
On the main account page, this all information should be presented. You will only need to check if all passwords or other credentials that are mentioned are correct or not. If all the credentials is true then go to the other solution.
The same error that you can encounter while reading “more than one database tables are available and you need to repair the database”. If you encounter the same error then you will have to add the code in the wp-config.php file.
Now you will have to visit the page i.e. http://www.mywebsite.com/wp-admin/maint/repair.php
Replace mywebsite with your own domain name.
Now click on repair and optimize database or repair database. The code we mentioned above will give permission to repair the screen. Does not matter if you are logged in or not. Therefore it is important to remove it once the error is fixed.
4. Now setup the lost admin privileges
It is possible that you are able to log in but actually, you are not able to access the all functionalities of admin. This can be because of following reason
- The owner of a website has taken out the rights of admins
- Or the admin account might be deleted
To you first have to create a new user to fix this problem. Thus you will have to make use of phpMyAdmin, and find out the wp_users table. And click on the Insert tab:
Now add all this information to it
- ID: here you will have to choose a number and remember it.
- user_login: here make use of username
- user_pass: here add the password, and select MD5 under the function column from the drop-down.
- user_nicename: from here choose a nickname. Make sure it is visible to the people so choose an easy one.
- user_email: your email ID
- uer_registered: set the date of today
- user_status: set it to zero
- display_name: you can add here your nickname too.
Now save the changes and open the wp_usermeta table. now the following values should be entered into InsertTab:
- In the new row enter these values
Now save all changes and with the new credentials that you entered login once again.
5. Within your core files, fix PHP errors
With parse error, if you have locked out WordPress admin screen while editing the files then this can be because of unintentional errors. And this can happen to anyone. If you are new to the editing code, then this might occurs frequently.
However, it may also cause due to missing semi-colon.
Here you can make use of some different text editor to make your edits.
Does not matter what is the reason, you can be logged out of your website by chance. However, with a few tricks and techniques, you can locked out WordPress admin screen which may include due to following reasons.
It may cause because of an error i.e. WSoD. To resolve this you will require a skill of FTP.
Not having correct passwords which you can reset with the help of the phpMyAdmin file.
The database credentials are not correct, thus this can be repaired with the help of your database.