Are you having trouble logging into your WordPress admin area?
This can be caused by a lot of different reasons, which makes it tricky for beginners to troubleshoot.
In this article, we will show you what to do when you are locked out of WordPress admin (wp-admin) so that you can regain access to your site.
Why Are You Locked Out of WordPress Admin?
We often hear from users who are locked out of WordPress admin area. This is frustrating and can bring your productivity to a standstill. You can’t write posts, respond to comments, or do any work on your WordPress website.
If you are having trouble logging in to someone else’s site, then you should contact the site owner or admin to let them know. They can explain why you don’t have access or work with you to solve the problem.
If you are the site owner, then you can follow our troubleshooting steps below.
There are a few reasons why you could be locked out of WordPress admin, so let’s take a look at each of them one by one. Hopefully, through this process of elimination, you will be able to figure out the solution to your problem.
You can also refer to our WordPress troubleshooting guide to find out what is causing the issue and how to fix it. You might also find a solution in our list of the most common WordPress errors and how to fix them.
With that being said, let’s have a look at some steps you can take when you are locked out of WordPress admin. You can use the links below to quickly navigate to the error message you see:
- 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
- Your Site Is Experiencing a Technical Issue
Error Establishing Database Connection
Are you seeing the ‘Error establishing database connection’ warning on every page of your site? This message is shown for various reasons, such as a corrupt database or issues with your web hosting server.
If you are seeing this error when trying to log in, then please refer to our guide on how to fix the error establishing a database connection in WordPress.
500 Internal Server Error
Another WordPress error that a beginner may come across is “Internal Server Error”, or sometimes “500 Internal Server Error”. This error is displayed when there is something wrong, but the server is unable to identify where the problem is.
If you see this message when trying to log in to WordPress, then follow the steps in our guide on how to fix the 500 internal server error in WordPress.
404 ‘Not Found’ Error
Sometimes, users make a mistake when changing the WordPress address and site address in their WordPress settings. The next time they try to log in to their admin area, they see the error ‘Error 404 – Not Found’.
If this is happening to you, then you can check our guide on how to change your WordPress site URLs. You won’t be able to use Method 1 because you can’t log in, but the other methods should get you out of trouble.
Note: If you can log in to your site but see the 404 error when viewing one of your posts, then you have a different problem. You can learn how to fix the issue in our guide on how to fix WordPress posts returning 404 error.
403 Forbidden Error
Some users report seeing the “HTTP Error 403 – Forbidden” error when trying to log in to wp-admin. This error can be caused by incorrect file permissions, poorly coded security plugins, or your server configuration.
If you are seeing this error, then our guide on how to fix the 403 Forbidden Error in WordPress will help you track down and fix the problem.
401 Unauthorized Error
Another message you might see when you are locked out of WordPress admin is the 401 error. This error is sometimes accompanied by a message saying, ‘Access is denied due to invalid credentials’ or ‘Authorization required’.
You can see this message if you have password-protected your WordPress admin folder. It can also be caused by a WordPress security plugin or security measures taken by your hosting company.
Please refer to our guide on how to fix the 401 Error in WordPress to learn six solutions that will help you regain access to your website.
By default, WordPress allows users to enter passwords as many times as they want. Hackers may try to exploit this by using scripts that enter different combinations until your website cracks.
To prevent this, we recommend that you limit the number of failed login attempts per user. However, this might mean that you find yourself locked out of your own website when you enter the wrong password too many times.
If you are in that situation, then you should follow the steps in our guide on how to unblock Limit Login Attempts in WordPress.
White Screen of Death
Are you seeing a white screen on your WordPress admin? This issue is often referred to as the WordPress white screen of death.
This happens when you exhaust the memory limit. It could be caused by a poorly coded plugin or theme or by unreliable web hosting.
If you are seeing this error, then please refer to our guide on how to fix the WordPress white screen of death.
Incorrect Password Issue
There is nothing more frustrating than being told you have used the wrong password when you are sure you haven’t, and you even checked that your caps lock isn’t on.
This can happen if you were a victim of a hack, or you might just be making an honest mistake.
Worse still, when you try to change your password, you never receive the email because it goes to an address you no longer have access to.
Luckily, there is another way, and you can reset your WordPress password from phpMyAdmin. This method can be a bit overwhelming for new users, but it is your best hope for regaining access to your admin area.
Problems With Plugins
You may be locked out of WordPress admin due to a faulty plugin or theme. This may be the case if you can’t log in to WordPress admin after installing a new plugin or if the error message mentions ‘wp-content/plugins/’.
To regain access to your site, you will have to temporarily disable your plugins. You can do that using FTP or phpMyAdmin by following our step-by-step guide on how to deactivate all plugins when not able to access wp-admin.
Lost Admin Privileges
Sometimes, you may be able to log in to your WordPress admin, but you don’t see any of the admin functionality. For example, you don’t have access to your themes or plugins.
This can happen if your user permissions were modified. It could be that hackers have infected your site and then deleted your admin privileges.
In this case, you should add an admin user to the WordPress database via MySQL (phpMyAdmin).
Hacked WordPress Site
If you suspect that your site has been hacked, then there are other steps you may need to take.
A hacked website may look different, display different content, or automatically play music or other media. Worse still, it may be infecting your visitors with viruses, so you need to act quickly.
You can start with our beginner’s guide on how to fix your hacked WordPress site. We will show you how to identify the hack, restore your site from a backup, and remove any malware.
After that, you should protect your site from future attacks. We show you how to do that in our ultimate WordPress security guide.
Login Page Refreshing and Redirecting
Another type of login error is when your WordPress login page keeps refreshing and redirecting back to the login screen.
This can happen because of incorrect values for the site URL and home URL fields in the WordPress options table. It can also be caused by poorly configured permalink settings or redirects set in the .htaccess file.
To fix this problem, check our guide on how to fix WordPress login page refreshing and redirecting issue.
‘This Has Been Disabled’ Error
When you try to log in to your WordPress admin area, do you see the error ‘This has been disabled’? This message is displayed when you have gone to the wrong admin address.
A common WordPress security practice is to change the default admin login URL (domain.com/wp-admin) to something custom. This can help prevent hackers and bots from hammering your login URL trying to gain access.
If you forget that the URL has been changed and go to the old one, then you will see this error message. If you’ve forgotten the correct address, then you should check out our beginner’s guide on how to find your WordPress Login URL.
‘Briefly Unavailable for Scheduled Maintenance’ Error
Are you seeing the ‘Briefly unavailable for scheduled maintenance’ error in WordPress? This error usually appears while updating WordPress core, plugins, or themes.
But if your WordPress site fails to finish the update, then you are left stuck in maintenance mode.
To fix the problem, you should check our guide on how to fix the Briefly Unavailable for Scheduled Maintenance error in WordPress. The guide will also explain why the error happens and how to avoid it in the future.
PHP Syntax Errors
PHP errors can happen after you paste a code snippet from a WordPress tutorial or website. The wrong code can stop your website from working properly and stop you from logging in.
Often, beginners use the built-in WordPress editor from their dashboard. That feature is handy but can lead to disaster if you don’t know what you are doing.
That’s why we wrote our beginner’s guide to pasting snippets from the web into WordPress.
Note: In many cases, it’s safer to use a code snippets plugin like WPCode instead of directly entering custom code. For more details, you can see our guide on how to add custom code safely in WordPress.
If you are locked out of WordPress admin because of a code snippet, then you will have to fix the problem manually using an FTP program like FileZilla to access your files. If you are not familiar with FTP, then check our beginner’s guide on FTP.
After you have connected to your WordPress site using the FTP software, you should follow our guide on how to fix syntax errors in WordPress to correct or remove the code that you added.
Your Site Is Experiencing a Technical Issue
Sometimes, when trying to access your WordPress admin area, you may see a white screen or a message saying, ‘The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.’
You will need to log in to your administrator email account and open your inbox.
You should see an automated email from WordPress that will tell you which theme or plugin is causing problems on your site. It also provides a login link so that you can access your WordPress admin.
Simply click on the link, and you will be able to access your WordPress admin in recovery mode. Then, you will need to deactivate the plugin or theme causing the problems on your site.
However, you may not receive this email with the login link. In that case, please see our guide on how to use WordPress recovery mode.
We hope this tutorial helped you fix the ‘locked out of WordPress admin’ problem. You may also want to learn how to choose the best WordPress hosting or check our list of must have plugins to grow your website.