What to Do When You Can’t Access wp-admin?

Jeniffer| 2018-02-11 Tutorials, WordPress Comments( 0 )

For WordPress website owners, you may have ever been locked or currently are locked outside of your WordPress admin namely wp-admin. If you do, then don’t panic, you need recall what you have just changed to analyze reasons of this issue and fix it accordingly. 

In below, we are to help you solve the problem. You need understand that there are several common reasons that can cause this issue. To illustrate the problem clearly, we will introduce several most common situations with specific methods to solve the error in WordPress. 

Password Doesn’t Work (even Recovery Doesn’t Work Either)

The first situation comes into our mind is related to your password. Sometimes you can find that you can access wp-admin and your user password does not work. It may be simple that you just forget the password because you are running several website at the same time, or your website could be attacked and your password has been changes. 

If you have attempted to recover your password, but it still cannot work, which will be even worse. In this case, you can only reset password in WordPress DB, which is not different as you imagine, so don’t scare yourself. There are just two steps:

Step 1: Access WordPress DB with phpMyAdmin

In order to reset your password, the first step is to get into WordPress DB, which often uses phpMyAdmin offering users an intuitive interface. If you do have the access to it, then you can ask your WordPress hosting provider to offer you’re the access. 

After getting here, you can find the table of “wp_user”. There is one thing you need know is that if you ever changed the database prefix when you were installing it, then the name of the table will be different but still with the end “_user”.

In the table, WordPress stores all the users of your website, so you can find all users’ profiles in a list after clicking on it. 

Step2: Change Your Password

Now you need to change your user password. Click on “Edit” next to you and then find “user_pass” that saves your password. You will see gibberish in this field, because it has been encrypted. 

Next, delete the old password and enter the new one in the place. Then, there is one important thing to do is that ensure you select “MD5” in the column of “Function”. After that, you can hit “Save” button at the bottom 

To pick that function is for encrypting your new password again. Once save your new password, then will be able to access WordPress Admin now, if we are correct in the reason. 

Too Many Login Attempts

If you are still outside of wp-admin, then you should to made more tests. Here we know that if you have practiced too many login attempts that could lead to the problem. Actually, limiting your login attempts is also a good way to avoid brute force attack. Here is the method to fix it.

Delete the Lockout in Your WordPress DB

If you are locked outside of WordPress Admin, you can ask your security plugin provider’s help. Enter your WordPress DB and find “wp_itsec_lockouts”(which maybe different names because of different security plugins using) which saves all logged out users. What you need do is to delete your lockout. 

If the problem is here, then you should be able to enter your WordPress Dashboard now. To avoid alike problems in the future, you can while list your IP address in WordPress Dashboard. 

If you think the problem is in the security plugin you are using, you can search for your user name with “locked out” on Google search engine (the search term can be other similar phrases with your user name) to find a specific solution. 

Last Resort -- Disable Your Security Plugin

However, it is still possible that you cannot find a proper solution to deal with your security plugin problem. Then, you can use the last resort to disable current security plugin on your WordPress website. 

For this, you need firstly build up a connection to a FTP server like FileZilla. Then, access plugins folder under wp-content. Now, you can rename your security plugin’s directory to disable it. after these, you can test if you are still locked outside of WordPress Admin. 

Lost Admin Privileges

The third situation is that it could attackers hacked your website which could lead you lost your admin privilege. It means that you can still access WordPress backend, but you can’t access those important menus such as Themes and Plugins. Fortunately, the situation is not the worst one.

Create a New User for You

First, access WordPress DB and find “wp_user” >> click on “Insert” menu at the top. 

Now you can create a new one for you by entering some necessary information as the list in below: 

  • ID: Enter any unused number. If you are not sure, you can just count the existing users and set your new ID as the number following the total number of existing users. Note you may need the ID in later steps, so always remember it. 
  • user_login: It is your WordPress login. Expect the admin you can choose any one you like.
  • user_pass: This is your user password we have practiced in the first situation. Enter your new password, remember to pick “MD5” in “Function” column and finally save your settings.
  • user_nicename: This username will be displayed both in WordPress Dashboard and your website. Therefore, you need pick one you want other to see on your site.
  • user_email: Type in the email address you are willing to connect to the new user.
  • user_registered: Just select current date from built-in calendar. 
  • user_status: You can set “0” here.
  • display_name: The username displayed on your site.

Once done, you can press “Go” to save the new user.

Configure User Meta

Access Database >> find "wp_usermeta" table to configure the user meta. (You can find the table in the list on the left.) Now, same to above steps: click on “Insert” to get the configuration menu:

Now, all you need to do is to fill the blank space as following:

  • unmeta_id: This will be filled automatically so you can move on to the next. 
  • user_id: Here you need input the ID number you just set above. 
  • meta_key: Just write down “wp_capabilities” which is fixed. 
  • meta_value: Input “a:1:{s:13:”administrator”;b:1;}”.

Once done, just click on “Go” to save your settings. Again, click on “Insert” to input the following settings: 

  • unmeta_id: Leave it empty. 
  • user_id: Input the ID number just entered. 
  • meta_key: Enter “wp_user_level”.
  • meta_value: Input “10”.

Save all these settings again! Then, you can go back to log in WordPress with the new user information. Once you login, you should firstly change the user profile which is at top right corner. Here you can press “Edit My Profile” to complete your profile. 

PHP Parse Error

Sometimes that you are locked outside of wp-admin is not because any other outside reasons but for there are even tiny errors happening inside of your WordPress.

It could be that you inserted a shortcode snippet in a file of your site. For beginners, they often do this with WordPress inbuilt editor but they cannot reverse it. If encounter this issue, you don’t have to be anxious because as long as you can remember where you added the shortcode snippet (which usually is in the file of your plugin’s functions.php), then it is easy to make your WordPress come back normal. Simply use a FTP client to connect to your website and then use a code editor such as Notepad++ to edit the code: you just need to take out the snippet you added previously and then upload the file again. Now, the error should be fixed and you can try to access wp-admin. 

Other Problem

When you are locked out of wp-admin, your site could have the error of the While Screen of Death. We have talked this problem in our previous article how to fix While Screen of Death in WordPrss. It can be caused by the incompatibilities between plugins, WordPress theme issues, or too low PHP memory limit. You can find specific methods to deal with the problem with different reasons. So, here we won’t talk any more. 

Can You Access wp-admin Now?

No WordPress webmasters is willing to be locked outside of WordPress, but fortunately there are always easy solutions to handle each different problem and even beginners can apply to fix it. Hope our solutions can cover your problems so that you can find a simple method to quickly get back into your WordPress. Meanwhile, we also hope that if you ever experienced different problems to make you be locked out of WordPress, you can share your methods helping you back into WordPress again by leaving them in comments. 

We hope webmasters to share and promote the good articles ,Please click herecontribute

You need to log in to commentLogin|Register

Be the first to comment!