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

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 you can regain access to your site.

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

Why Are You Locked Out of Your Own WordPress Site?

We often hear from users who are locked out of the 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’re 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 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’s causing the issue and how to fix it. You might also find a solution in our list of the 50 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

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’re 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

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 get the error ‘Error 404 – Not Found’.

WordPress Address and Site Address

If this is happening to you, then 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

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’re 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

Unauthorized Error

Another message you can see when you’re locked out of your WordPress site is the 401 error. This error is sometimes accompanied by a message ‘Access is denied due to invalid credentials’ or ‘Authorization required’.

You can see this message if you’ve 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.

Limited Logins

Limited Logins

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’re 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

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

Incorrect Password Issue

There’s nothing more frustrating than being told you’ve used the wrong password when you’re 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’s another way, and you can reset your WordPress password from phpMyAdmin. This method can be a bit overwhelming for new users, but it’s your best hope for regaining access to your admin area.

Problems with Plugins

You may be locked out of your WordPress site 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/’.

Deactivate All Plugins

To regain access to your site you’ll 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 login 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).

Add an Admin User via MySQL

Hacked WordPress Site

If you do 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.

Start with our beginner’s guide on how to fix your hacked WordPress site. We’ll 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

Login Page Refreshing and Redirecting

Another type of login error is when your WordPress login page keeps refreshing and redirecting it 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 setup 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 into 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’ll see this error message. If you’ve forgotten the correct address, then you should check our beginner’s guide on how to find your WordPress Login URL.

‘Briefly Unavailable for Scheduled Maintenance’ Error

'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 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 so that you can’t log 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.

If you’re locked out of your WordPress admin because of a code snippet, then you’ll have to fix the problem manually using an FTP program to access your files. If you’re not familiar with FTP, then check our beginner’s guide on FTP.

After you connect 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.

We hope this tutorial helped you log into your WordPress admin area. You may also want to learn how to choose the best WordPress hosting, or check out list of must have plugins to grow your website.

If you liked this guide, then please consider subscribing to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post What To Do When You Are Locked Out of WordPress Admin (wp-admin) appeared first on WPBeginner.

How to Fix the WordPress White Screen of Death (Step by Step)

The WordPress white screen of death is one of the most common WordPress errors. It is also a frustrating error because there is no message, and you are locked out of WordPress.

Another problem with the white screen of death error is that sometimes, it only affects a certain part of your website. For example, you may only see the white screen of death inside the WordPress admin area, while everything else works fine. In other cases, you might only see it on a specific post.

In this article, we will show you how to fix the WordPress white screen of death by looking at different solutions.

How to Fix the WordPress White Screen of Death (Step by Step)

Note: Before you make any changes to your site, make sure you have a backup of your WordPress site. If you don’t have access to the admin area, then see our guide on how to manually create a WordPress database backup.

Why Do You See the White Screen of Death in WordPress?

The majority of the time, when you see a white screen of death when trying to visit your WordPress website, it means that a script on your website exhausted the memory limit.

The unresponsive script either gets killed by your WordPress hosting server or simply times out. This is why no actual error message is generated, and you just see a plain white screen.

WordPress showing white screen instead of website

However, sometimes, you may see an error message.

For example, you might see a critical error message instead of a plain white screen.

Critical error in WordPress

Whether you are seeing a blank screen or the message ‘There has been a critical error on your website’, it’s the same error.

This error can also happen due to a poorly coded theme or plugin installed on your site. Sometimes, it can happen if there is an issue with your web hosting server.

Since the white screen error can be caused by any number of things, it requires methodical troubleshooting to fix it. Here are the steps you should try:

Video Tutorial

If you’d prefer written instructions, then just keep reading.

1. Check Whether the Problem Happens on Your Other Sites

If you have other WordPress sites installed on the same hosting account, then you want to start by checking if the problem is happening on other sites as well.

If it is, then that’s a strong indicator that something is wrong with your WordPress hosting service. This could be a temporary issue affecting their service, and you need to reach out to their support for more help.

On the other hand, if the issue is only happening with one website or a specific part of that site, then you know that the problem is with that particular website.

2. Fix the White Screen Error With WordPress Recovery Mode

If the white screen of death error is caused by a WordPress plugin or theme, then WordPress may be able to catch it.

The new fatal error protection feature introduced in WordPress 5.2 can sometimes catch the error, so you may not even see a white screen. Instead, you will see a message that the site is having technical difficulties.

This Site Is Experiencing Technical Difficulties Error Message

WordPress will also send an email about the problem to your admin email address.

The email will have the subject ‘Your Site is Experiencing a Technical Issue’.

Technical Difficulties Email With Link to Recovery Mode

This email message will point out the plugin or theme causing the error, and it will also contain a special link.

This link will allow you to log in to the WordPress recovery mode and deactivate the faulty plugin.

WordPress recovery mode dashboard

However, if you are seeing the plain white screen of death with no email or recovery mode option, then you need to manually fix the error.

3. Increase the Memory Limit

Usually, this error happens because a script has exhausted your web server’s memory and quit in the middle.

To fix this, you need to increase the PHP memory available to WordPress. This will allow the script to use more memory to finish the job it was supposed to do.

You will need to edit the wp-config.php file on your WordPress site or use a code snippet plugin like WPCode

You can follow the instructions in our tutorial on how to increase PHP memory in WordPress.

4. Fix the White Screen Error by Disabling All Plugins

If increasing the memory limit did not help, or if you have a high memory limit, like 256M or 512M, then you need to start troubleshooting.

In our experience of troubleshooting this issue, we have always found that the issue is either with a specific plugin or a theme. Let’s go ahead and disable all the plugins.

If you can still access the WordPress admin area, then you can simply go to the Plugins » Installed Plugins page. Select all the installed plugins and then select ‘Deactivate’ under the ‘Bulk actions’ dropdown.

Deactivate all WordPress plugins

However, if you don’t have access to the WordPress admin area, then you will need to deactivate all plugins via FTP.

First, connect to your WordPress site using an FTP client. Once connected, go to the wp-content folder, where you will see the plugins folder.

Now, you need to right-click on the plugins folder and then select ‘Rename’. You can rename the plugins folder to ‘plugins-deactivated’.

Using FTP to Rename the Plugins Folder

WordPress looks for a folder named plugins to load all plugins. When it cannot find the folder, it simply deactivates all plugins.

If this fixes the issue, then enable one plugin at a time to get to the bottom of the issue. Once you find the plugin causing the issue, you can replace it with an alternative or report the issue to plugin authors.

5. Activate the Default Theme

If the plugin troubleshooting doesn’t fix the issue, then you should try replacing your current theme with a default theme.

First, connect to your website using an FTP client and go to the /wp-content/themes/ folder. It contains all installed themes on your website.

Right-click to select your current WordPress theme and download it to your computer as a backup.

Using FTP to Download the Current Theme as a Backup

Next, you need to delete your current theme from your website.

Simply right-click on your theme folder and select ‘Delete’. Your FTP client will now delete the theme from your website.

Using FTP to Delete the Current Theme

Now, if you have a default WordPress theme like (Twenty Twenty-Two or Twenty Twenty-Three) installed on your website, then WordPress will automatically start using it as the default theme.

However, if you don’t have a default theme installed, then you need to manually install it using FTP.

If this fixes the issue, then you should look at your theme’s functions.php file. If there are extra spaces at the bottom of the file, then you need to remove those, and sometimes that fixes the issue.

If you are using a poorly coded function in your theme’s functions.php file, then it can cause the white screen of death error as well.

Consider downloading a fresh copy of your theme from its source and then installing it manually using FTP.

6. Enable Debug Mode to Catch Errors in WordPress

If nothing has helped so far, then the next step is to turn on debugging in WordPress. This will allow you to see what type of errors are being outputted.

Simply add the following code to your wp-config.php file:

define( 'WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );

Once you add this, the blank screen will now have errors, warnings, and notices. These may be able to help you determine the root cause.

If you don’t see any errors, then you may still want to check the debug log.

Simply visit the wp-content folder on your website using an FTP client. There, you will find a new debug.log file containing a log of all errors, notices, and warnings.

Debug log

7. Clear the WordPress Cache

Sometimes, you may have access to the backend, but the front end of the site has the white screen of death.

This can happen because of a caching plugin. In that case, you simply need to empty your WordPress cache.

You can see our guide on how to clear the cache in WordPress for detailed instructions.

8. Fix the White Screen Error for Longer Articles

If you have a white screen of death only on a very long post or page, then this method might work.

This trick basically increases PHP’s text processing capability by increasing the recursion and backtrack limit. You can paste the following code into your wp-config.php file:

/** Trick for long posts */
ini_set('pcre.recursion_limit',20000000);
ini_set('pcre.backtrack_limit',10000000);

We understand that this is a very frustrating error, and we hope that one of the tricks above has fixed the issue for you.

You may also want to see our WordPress troubleshooting guide, which teaches the steps you should take to catch and fix WordPress problems by yourself, or our expert pick of the best WordPress managed hosting providers.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Fix the WordPress White Screen of Death (Step by Step) first appeared on WPBeginner.