What To Do When You Are Locked Out of WordPress Admin (wp-admin)

Most of the errors or issues that we face are more difficult to troubleshoot than to fix. One such troublesome WordPress issue is being locked out of the WordPress Admin. The troubleshooting of this error can be a bit troublesome. To ease out, we are going to discuss the causes of this type of WordPress error along with the solution to fix it. Having said that we can now move ahead with the article.

Possible causes of being Locked Out of Your Own WordPress Site:

Being locked out of a website that does not belong to you, can be solved by asking the owner of the site to look into the problem. However, if you are not able to log in to your own WordPress website, then you should first try to first find out the reason and then solve it step-by-step. You can follow the article to look into the most probable reasons behind your locking out of your WordPress admin. Below is a list of causes. Later in the article, we are going to discuss them one by one.

  • Error Establishing Database Connection
  • 500 Internal Server Error
  • 404 ‘Not Found’ Error
  • 403 Forbidden Error
  • 401 Unauthorized Error
  • Limited Logins
  • White Screen of Death
  • Incorrect Password Issue
  • Problems with Plugins
  • Lost Admin Privileges
  • Hacked WordPress Site
  • Login Page Refreshing and Redirecting
  • ‘This Has Been Disabled’ Error
  • Briefly Unavailable for Scheduled Maintenance Error
  • PHP Syntax Errors

Error Establishing Database Connection:

If your site is displaying an ‘Error establishing database connection’ warning, you can fix it in a few steps, though the reasons could be many. The causes behind the error establishing a database connection could be:

  • Incorrect database information in the WordPress settings (incorrect credentials)
  • A corrupt database (the database files are corrupt)
  • An irresponsive database server (database server is down)

To get a more detailed understanding of fixing such type of error, you can check our article on how to fix the error by establishing a database connection in WordPress.

500 Internal Server Error:

The “Internal Server Error”, or “500 Internal Server Error” is one of the most common WordPress errors. If your website is displaying an “Internal Server Error”, or “500 Internal Server Error”, you might not be getting any detailed information about the reason behind it. You can thus start by looking into the most common causes.

The common reasons behind the 500 internal servers are errors because of plugins or errors due to the theme functions. Other reasons can be, errors due to corrupted .htaccess files or errors due to PHP memory limit. It is also possible that, in WordPress, the parts of the website other than the admin area are not causing any problem, but the internal server errors occur while accessing the admin area.

You will get a better idea about troubleshooting and fixing this type of error with our article on how to fix the error by establishing a database connection in WordPress.

404 ‘Not Found’ Error:

If you are getting an ‘Error 404 – Not Found’, while trying to log in to your admin area, then it is possible that you have changed the WordPress address and site address in your WordPress settings. To fix this issue you can take help from a guide on how to change your WordPress site URLs.

It is also possible that the WordPress admin area is accessible, however, you might be getting a 404 Not found error, while accessing a page or post. In such cases, the 404 Not found error is caused usually in either of the below two scenarios,

  • The .htaccess file got deleted.
  • The rewrite rules might have some errors.

To solve the issue you can check our article on how to fix WordPress posts returning 404 errors.

403 Forbidden Error:

We have a separate article on how to fix the 403 Forbidden Error in WordPress. You can refer to this article if your website is displaying an “HTTP Error 403 – Forbidden” error while you are being locked out of your WordPress admin. The causes of this error along with the easiest solutions to fix them are distinctly explained in our article on how to fix the 403 Forbidden Error in WordPress.

401 Unauthorized Error:

If your WordPress website is displaying a 401 unauthorized error, ‘Access is denied due to invalid credentials’ or ‘Authorization required’ while trying to log in to your WordPress admin, then the most probable scenarios could be that,

  • Your WordPress admin folder is password-protected.
  • A WordPress security plugin is causing a problem.
  • Your web hosting company has taken certain security measures that are causing the issue.

For effective troubleshooting of this error, you can take help from a specific guide on how to fix the 401 Error in WordPress.

Limited Logins:

This is not an issue, but a prevention step. Limiting the number of failed login attempts per user is a security measure that you choose for yourself. In WordPress then is no such limits by default. Though limited logins are recommended for better security of your WordPress website, it might create a problem for you, in case, you have attempted login through a wrong password too many times. Now, that you are locked out from your WordPress admin due to too many failed login attempts, you need to unblock the limited login attempts in WordPress. For this, you can take help from a guide.

White Screen of Death:

The WordPress white screen of death is one of those WordPress Errors that locks you out of WordPress.

The most obvious reason for this error is that a script on the website drained the memory limit. It thus becomes unresponsive. Now, there could be either of the two scenarios:

  • The WordPress hosting server kills the script.
  • The script times out.

Other reasons behind this could be

  • Installation of a poorly coded theme or plugin on the website.
  • There is an issue with the web hosting server.

To get a more detailed understanding of troubleshooting this error, you can check our article on how to fix the WordPress white screen of death.

Incorrect Password Issue:

The password is Incorrect! It never feels good to see this message or something just like this. If any such message appears on your screen, it would be better to check if you are really entering the right password. It is possible that you might have changed the password and you might be entering the old one. What about the Caps Lock? Confirm that too, just to be sure.

If the mistake is not from your side, then the other possible situation is that your account is hacked. In this situation, the email address for receiving the mail would have been changed too. Thus, receiving the mail to reset the password will not help in this situation. Now, that most of your paths are blocked, the best path that will take you back to your WordPress admin is resetting the WordPress password from phpMyAdmin. If you are not sure how to reset your WordPress password from phpMyAdmin, you can take the help of a beginners’ guide for the same.

Problems with Plugins:

Have you installed a new plugin or theme and you are locked out of your WordPress site after that? Or maybe there is a message on the screen mentioning something that gives you the idea that it is wp-content/plugins/ behind the error. If it is so, then you will have to temporarily deactivate all the plugins. You can use FTP or phpMyAdmin for disabling the plugins. To get a clear concept on deactivating the plugins, take the help of a guide.

Lost Admin Privileges:

Are you not able to see any of the admin functionality? If your account is hacked, then it is possible that you are not locked out of your WordPress admin, but you may be facing problems with your user permissions. If your admin privileges are deleted by the hackers, then you might not have any access to your themes or plugins or you might be facing some similar issues.

Now that the scenario here is like this, solving the issue is possible by adding an admin user to the WordPress database via MySQL (phpMyAdmin). You can learn more about the same before taking any step further.

Hacked WordPress Site:

Being hacked is one of the worst scenarios that you can face with your WordPress site. Now that we have already discussed the incorrect password issue and the issue with your admin privileges, this might not be the end. If you are hacked and your website is now infected, it might behave randomly. Is your website is looking somewhat different? Is the music playing automatically on your website? Or is there any other problem with other media? How about the content on your website, do they look the same as before? There could be many other issues. But, what you should be more concerned about right now is getting the visitors on your website getting infected with viruses.

To avoid any such worse situation, it is best to solve the issue from the root, as soon as you find it. Apart from detecting the malware and removing it completely from your WordPress website, you also need to make sure that your website is now protected from any such cyber attacks in the future. Considering a complete and efficient WordPress security guide is what is recommended by us.

Login Page Refreshing and Redirecting:

Is your WordPress login page keeps refreshing and redirecting it back to the login screen? There could be two main causes behind this kind of error.

  • The values for the site URL and home URL fields in the WordPress options table are incorrect.
  • The permalink settings or redirects setup in the .htaccess file are poorly configured.

To fix this issue, you can go through our article on how to fix WordPress Login Page refreshing and redirecting issue.

‘This Has Been Disabled’ Error:

‘This has been disabled’ – Is the screen displaying this error message while you are locked out of your WordPress admin? The most probable cause behind such an error is going to the wrong admin address. Earlier, you might have changed the default admin login URL (domain.com/wp-admin) to something custom. This is commonly done for security purposes. With the changed URL, the hackers and bots who try to gain access to your website are thwarted from hammering your login URL.

But now that you have changed your URL and you are still trying to use the old one or if you forgot your WordPress login URL, you need to find the correct URL and go to the correct one. Look for a beginners’ guide on the same for an easy fix.

Briefly Unavailable for Scheduled Maintenance:

‘Briefly unavailable for scheduled maintenance’ – Is your screen displaying this error message? If you are locked out of your WordPress admin and you are left stuck in maintenance mode, it can be really frustrating. The reason behind it is that your WordPress site has failed to finish the update error in WordPress and the WordPress core, plugins, or themes are updating. To make sure that nothing like this happens again, you can take help from our article on how to fix the Briefly Unavailable for Scheduled Maintenance Error in WordPress.

PHP Syntax Errors:

PHP Syntax errors can happen because of

  • Pasting a wrong code snippet from some site.
  • The use of the built-in WordPress editor when not being skilled with that.

PHP Syntax Errors can lock you out from your WordPress admin. Fixing this issue is possible manually. You can use an FTP program to access your files and then fix the syntax errors.

What can you do to fix the Syntax Error?

  • Remove the error causing code, or,
  • Fix the syntax of the error causing code.

To get a detailed idea you can follow our article written separately on how to fix the syntax error in WordPress.

We hope that your problem is resolved by one or more of the solutions that we have discussed in this article.

 

Please follow and like us:
Content Protection by DMCA.com