Can't access wp-admin.

Being locked out of your WordPress dashboard can be incredibly frustrating – you definitely don’t need me to tell you that.

However, while you might not be feeling great right now, there’s good news. In most cases, it’s just a temporary issue and, once you diagnose the underlying problem, you’ll be back into your WordPress dashboard in no time, with no loss to your site’s content.

In this post, I’m going to help you figure out why you can’t access wp-admin and how to fix the problem. To do this, I’ll list a bunch of potential issues along with solutions to each problem.

These solutions are based on my own personal experience, as well as reading tons of WordPress.org Support Forum and Reddit threads to what what kinds of issues people are experiencing. 💡

If you already have at least an idea of what’s going wrong, you can click the list below to jump straight to the solution to that problem. On the other hand, if you have no idea what’s happening, you can use this list as a sort of troubleshooting guide.

Common reasons why you can’t access wp-admin

Go through the problems/solutions that apply to you one-by-one and you should eventually find the problem and get things working again:

  1. Your login credentials (username/password) are incorrect
  2. You’re being blocked by your security plugin
  3. You changed the WordPress login URL
  4. Your WordPress memory limit is too low
  5. There’s a problem with your WordPress site (Critical Error, White Screen of Death, 500 Internal Server Error, etc.)
  6. There’s something wrong with your .htaccess file
  7. Your site URL is wrong
  8. There’s a problem with file permissions
  9. Your core WordPress files are corrupted
  10. Web browser cookies are disabled
  11. Your host’s firewall has blocked your IP address
  12. Overactive antivirus software is blocking wp-admin
  13. Your user account has the wrong role
  14. Cloudflare SSL is having issues (if using Cloudflare)

👉 Let’s get started so that you can get back into your dash. But first:

The thing to do before you start digging

Before you do anything else, you should clear your browser cache and cookies to make sure the problem is real.

Before you assume that there’s some big reason for why you can’t access wp-admin, you should rule out some simple issue with your web browser cache and cookies. Strange things can happen and sometimes clearing your browser cache fixes everything (which means there was never any problem with your WordPress site itself).

🧹 To clear your browser cache in Chrome:

  1. Click on the “three dot” icon in the top-right corner.
  2. Hover over the More tools menu
  3. Choose Clear browsing data
  4. Make sure that both cookies and browser cache are selected
  5. Click Clear data (I recommend leaving the Time range as the Last hour so that you don’t have to re-login to every single site)
Clearing your browser cache can help if you can't access wp-admin.

Here are instructions to clear the browser cache for other web browsers.

If that didn’t fix the problem, let’s get into the actual issues… 👇

1. Your login credentials are incorrect

One of the simplest reasons that you might be locked out of WordPress is that your login credentials are incorrect. While this seems basic, it’s happened to all of us at some point or another.

You might’ve forgotten your password, another user at your site might’ve changed it for some reason (if you have multiple admins), or, in very rare situations, a malicious actor might’ve gotten a hold of your account and changed the password.

So – let’s get you a new password. 🔒

Try this first: Use the WordPress password reset feature

If your admin credentials are incorrect, your first step should be to use WordPress’ built-in password recovery feature. You should see a “Lost your password?” option on the WordPress login page:

Try the password reset when you can't access wp-admin.

If this feature works, you should receive an email that lets you reset your password and log in. If the password reset feature doesn’t work, no worries! You can also manually reset your password from your hosting account, it’ll just require a few extra steps.

If that fails: Manually reset your password by editing your database

If the password reset email isn’t working, you can manually change your password or create a new WordPress admin user by editing your site’s database with a tool called phpMyAdmin (which virtually all WordPress hosts offer).

There are a few steps here, 👨‍🎓 so we wrote entire guides on how to do this:

  1. How to manually change your WordPress password via phpMyAdmin
  2. How to add a new WordPress admin user via phpMyAdmin

2. Your security plugin is blocking you

If you’re using a WordPress security plugin, you might be unintentionally blocking yourself. For example, many WordPress security plugins include a feature to limit login attempts by temporarily banning you if you enter an incorrect username/password too many times.

👉 Here, you have two options:

  1. You can wait – usually you’ll only be blocked for a period of time before you can try again.
  2. You can manually deactivate the security plugin so that you can log in right away.

So how can you deactivate your security plugin if you can’t access the WordPress dashboard? You can use FTP (or cPanel File Manager, if your host has that).

To get started, connect to your site’s server. Then, navigate to /wp-content/plugins and find the folder for your security plugin. For example, here, you can see the limit-login-attempts-reloaded plugin. Or, you might see wordfence, etc:

Find plugin's folder.

Now, just rename the folder and append -disabled. This will automatically disable the plugin and you should be able to log in again.

Once you’ve logged in, you can rename the folder again and remove the -disabled part. Then, you’ll be able to activate your security plugin:

Manually disable security plugin.

3. You (or a plugin) changed your login URL

One common WordPress security tip is to change the URL of your login page, which you can easily accomplish with a variety of plugins.

It’s a great tip… 🎯 until you forget the new URL and can’t access the admin yet again! To fix this and reset your original WordPress login URL, you can follow the same steps as manually deactivating a security plugin:

  1. Connect to your server via FTP or your host’s file manager.
  2. Go to the /wp-content/plugins folder and find the folder of the plugin that’s changing the login URL.
  3. Rename it to append -disabled.
  4. Log in via the default WordPress login URL.
  5. Rename the folder and reactivate the plugin. Make sure to remember your custom login URL this time!
Manually disable plugin when you can't access wp-admin.

4. Your WordPress memory limit is too low

If your WordPress site runs out of PHP memory, that can causes issues with different parts of your site and prevent you from accessing the wp-admin area.

This error can also come and go, which can make it tougher to diagnose.

When your site’s memory is maxed out, you might be unable to access the wp-admin. But during lower memory usage situations, you might not have any issues.

To fix this, you can try asking your hosting support if they’ll increase the PHP memory limit for you. Or, we have a guide that shows four ways to increase the WordPress memory limit by yourself.

5. You’re seeing the critical error, white screen of death, or 500 Internal Server Error

So far, the troubleshooting steps have been assuming that your WordPress site is functioning properly, there’s just something stopping you from accessing the WordPress dashboard.

However, another common reason why you can’t access the dashboard is that your site is experiencing some type of error. 🐞 The three biggest ones are:

  1. There has been a critical error on this website – this is a generic error that WordPress displays when it’s experiencing a PHP error or something similar. As a result, WordPress will automatically place your site in recovery mode until you fix the error.
  2. White screen of death – as the name suggests, you just see a white screen with no content when you try to log in.
  3. Internal server error – you’ll see a message that says something like “500 Internal Server Error” when you try to log in.

If you fix these errors, your site will start working and you can log in again. We have dedicated guides on how to fix all three:

We also have a general guide on how to troubleshoot WordPress errors.

6. There’s something wrong with your .htaccess file

Your site’s .htaccess file controls important functions, like redirects and how your permalinks are structured. If something goes wrong with this file, it can prevent you from accessing your WordPress dashboard. You might see something like ERR_TOO_MANY_REDIRECTS when you try to access your dashboard in Chrome. Or, it might present as another problem.

The solution here is to delete your existing .htaccess file and force WordPress to generate a new one.

👉 To do that, connect to your server via FTP or cPanel File Manager:

  1. Download the existing .htaccess file to your local computer so that you have a backup.
  2. Once you’ve backed up that existing .htaccess file, delete the .htaccess file on your server.

If you can log in after deleting the file, go to Settings → Permalinks and click Save. This forces WordPress to generate a new .htaccess file. You don’t need to change any settings – just click the Save button.

If you still can’t log in, that means the problem probably wasn’t with your .htaccess file. You can reupload the backup version and try some of the other methods on this list.

7. Your site URL is wrong

Your site URL configures what WordPress “thinks” is your proper URL. If your site URL is wrong, you won’t be able to log in because WordPress will try to redirect you to the wrong URL when you try to access the WordPress login page.

For example, if your site is https://yoursite.com, WordPress might try to redirect you to https://NOTyoursite.com/wp-login.php if your site URL is wrong, which will lock you out of WordPress.

To fix this, connect to your server via FTP or cPanel File Manager. Then, edit the wp-config.php file and add the following lines above the /* That's all, stop editing! Happy publishing. */ line:

define('WP_HOME','https://yoursite.com'); define('WP_SITEURL','https://yoursite.com');

Make sure to replace https://yoursite.com with the actual URL to your WordPress site.

Change site URL when you can't access wp-admin.

Note – once you add this to your wp-config.php file, you’ll no longer be able to change your site URL from the WordPress dashboard – remember this if you need to change domain names in the future.

8. There’s something wrong with your file permissions

A less common problem has to do with file permissions on your server. If you have the wrong file permissions for the wp-login.php file and wp-admin folder, that can make you unable to access the WordPress dashboard.

In general, all WordPress files should be 664 (except for the wp-config.php file) and all folders should be 775.

👉 To check and change file permissions, you can connect to your server via FTP. Then:

  • Make sure that wp-login.php is set to 664.
  • Make sure that the wp-admin folder is set to 775.
Change WordPress file permissions.

9. There’s something wrong with your core WordPress files

Finally, it’s rare, but there might be something wrong with the core wp-login.php file, which is what controls the WordPress login process.

To make sure this isn’t the case, 🚀 you follow these steps:

  1. Download the latest version of WordPress from WordPress.org
  2. Extract the ZIP folder
  3. Upload the wp-login.php file to your server using FTP or your host’s File Manager
  4. When prompted, choose to overwrite the existing version of the file on your server

10. Your web browser has cookies disabled

In order to keep you logged in to WordPress, your WordPress site relies on browser cookies.

If your browser has cookies disabled, this could be causing issues with that system and making it so that your WordPress site can’t properly interact with your web browser.

There are two main reasons why cookies might be disabled:

  1. You’ve disabled cookies for your site in your browser’s settings. Here’s a guide on how to enable cookies in all major web browsers so that you can check if this is the problem.
  2. You’re using a browser extension that disables/limits cookies, such as Ghostery. You can try temporarily disabling the extension or using a different browser to see if that fixes the problem.

11. Your IP address was blocked by your host’s firewall

In some rare situations, you might be locked out of your dashboard because your host’s security rules and/or firewall have blocked your IP address.

I’ve seen this happen several times where Mod_Security or some other security protection decided to block the person’s IP for some reason. For example, if you forgot your password and tried logging in with incorrect credentials a few times, you might’ve triggered a security rule that blocked your IP address.

To see if this is the issue, try logging in from a different IP address. Some ways to do this could be:

  1. Using a virtual private network (VPN).
  2. Using your smartphone’s data connection instead of your home Wifi.
  3. Trying from a different location, such as a coffee shop.

If you can log in from a different connection, you can try reaching out to your host’s support to ask them if they can check if your IP address has been banned by the firewall.

12. Your computer’s antivirus software is causing issues

This one is another very rare situation. However, I have seen some reports of people being unable to access their WordPress admin because of antivirus software on their computer, rather than an issue with their website.

In the two support threads that I found (linked here and here), the main issue seems to be with the BitDefender antivirus software. However, it’s possible that other antivirus tools could cause similar issues.

If you just installed or updated your antivirus software, it’s worth checking if this rare issue is causing problems. One easy way to see if it’s the case would be to try logging in with a different device that doesn’t have the antivirus software installed (such as your smartphone).

If it works on the other device, try temporarily deactivating your antivirus software to see if it fixes the problem. If that does fix the problem, you can try to tweak your antivirus software’s settings or switch to a different tool.

13. Your account has the wrong user role

If you’re able to log in to your WordPress dashboard but you’re not seeing most of the dashboard areas that you’re accustomed to, you might be experiencing an issue with the user role of your account.

For example, if you can access the dashboard to edit your profile, but you don’t see dashboard areas for Posts, Pages, Plugins, Appearance, and so on, then this is probably the issue. It might look something like this:

WordPress dashboard without admin

First, make sure you’re logging in to your WordPress admin account. If you created multiple accounts, you might be trying to log into the wrong account.

If you’re confident that you’re logging into an account that should have admin privileges, we have a guide on how you can manually create a new admin user via MySQL, which will let you completely bypass the WordPress dashboard and work from your hosting control panel instead.

14. Your Cloudflare-connected site has SSL issues

Another potential cause is issues with Cloudflare SSL. Usually, this issue affects your entire site, so it’s not that common to see it affect just the WordPress admin area. However, I have seen a few users experience this problem in just the admin.

If you’re using Cloudflare on your WordPress site, I recommend checking your Cloudflare SSL settings to see if there’s a potential issue. If you haven’t connected your site to Cloudflare, you can ignore this section, though.

Here’s how to locate these settings:

  1. Log in to your Cloudflare account.
  2. Open the dashboard area for the WordPress site where you’re experiencing issues.
  3. Go to SSL/TLS → Overview in the sidebar on the left.
  4. Click Configure next to SSL/TLS encryption.
  5. Try using either Flexible or Full. If it’s set to Flexible by default, try switching to Full.
  6. Click Save to make your settings live.
How to fix Cloudflare SSL issues blocking WordPress admin access

Still can’t access the dashboard? Last resort: restore from a backup

If all else fails, you can always try restoring your site from a working backup. While this is somewhat of a nuclear option, it might be able to fix small errors that are unique to your site.

Conclusion 🧐

Being locked out of WordPress is never fun. But with the troubleshooting steps in this article, you should hopefully have been able to figure out the issue and get back into your WordPress dashboard.

At this point, you might want to learn more about WordPress troubleshooting so that you can be better prepared in the future.

Are you still locked out of WordPress? Or have any questions about these troubleshooting steps? Ask us in the comments!

Yay! 🎉 You made it to the end of the article!

7 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Fadi Fakhouri
October 30, 2024 9:53 am

Legend!!! Thank you so much… got me out of the trouble:

Michelle Guzman
May 21, 2024 11:14 pm

What steps should we take if our WordPress administrator is no longer with the company and we don’t have access to the email associated with the admin account? How can we prevent losing access and recover our company account?

Member
Ivica
May 22, 2024 8:24 am

You can regain control by accessing the database directly through your hosting’s cPanel phpMyAdmin, where you can create a new admin user: https://wpshout.com/reset-your-wordpress-password-cpanel-phpmyadmin/

To prevent this in the future, ensure you have multiple administrator accounts and keep a record of access credentials in a secure place. You might find plugins like User Role Editor helpful for managing user roles and permissions effectively: https://wordpress.org/plugins/user-role-editor/

…and don’t forget to backup your site regularly: https://themeisle.com/blog/wordpress-backup-plugins-compared/ (I have been using All in one WP migration since 2014)

Dabat Johnson
February 27, 2024 7:13 am

Thank you so much . Now i fix it. My error was clear the cache

Member
Ivica
February 28, 2024 9:07 am
Reply to  Dabat Johnson

I am happy to hear that the article was of great use to you.

M A
February 26, 2024 10:56 am

Make sure that your host have not upgraded wordpress or PHP version. I suspect this is one of the most common reasons for these critical errors.

Member
Ivica
February 28, 2024 9:05 am
Reply to  M A

In addition to plugins, themes, and WordPress updates, keeping your PHP version up to date is crucial, you are right.

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!