Beginner's Guide for WordPress / Start your WordPress Blog in minutes

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

221 CommentsLeave a Reply

  1. hi
    I have come across an issue with the login attempts since I have activated my Loginizer plugin. I have been unable to login as an admin into my WordPress. I tried changing my password in my phpadmin, but it failed too. I tried login with the password and id from my Cpanel still it shows error in login id or password, please suggest me a solution.

  2. Hi,

    I am trying to install WordPress on localhost and keep getting the message ‘Sorry, that isn’t a valid email address. Email addresses look like username@example.com.’. Any email I try (all valid and working) gets the same response! Can you advise please? Thanks

  3. Hello,

    My browser crashed whilst I was attempting to change the URL of my site on wp-admin and now I’m unable to access the log in page or see the site.

    When I type in the URL of the site, I get the error message: This site is currently undergoing maintenance, and will be back shortly.

    When I type in the /wp-admin URL it shows me to a log in screen and I enter my details only for it to return the error message: This site is currently undergoing maintenance, and will be back shortly.

    Is anyone able to help?

    Thanks,

    Jess

    • Hi Cynthia,

      You may have a website built with a different website builder. Try to find out which one and then search on how to migrate from that website builder to WordPress.

      Admin

      • WordPress is hosting my blog. I’m now being told I don’t have any sites yet I logged in and wrote a post on October 3. When I use admin in my url I’m taken to a political site. I have my receipt of payment to wordpress but when I’m logged in there’s no record of a payment. I’m not sure how to fix this. Thank you for responding.

  4. After editing and publishing my new blog hosted with Bluehost, the front end of my website still shows a coming soon page. I don’t know what else to do.

    • Hi Teboh,

      Login to your Bluehost hosting account dashboard and then click on ‘My Sites’ in the left column. Take your mouse over to your site and then select Manage site. On the next scree, click on the Settings tab. Here you will find the option to turn off ‘Coming Soon Page On My Site’.

      Admin

  5. I have an inactive wordpress site (about a year) and I cannot log in to the admin panel. I’m trying to either change it and start using it again or closing it out.
    My issue was that I couldn’t remember the password and when I tried to reset it it would accept none of my email addresses.

    Can someone please help? I’ve been searching for the answer and can’t find anything about not having access through email.

  6. I locked myself out by installing a re-captcha plug-in, enabling it for log-in screen and then logging myself out. Unfortunately my log-in screen is created by another plug in and they don’t seem to be compatible. The log-in screen does not show the recaptcha and then when I try to log in it says incorrect details. Any ideas?

  7. Hello,
    So people from my work asked me to update the website but the guy who made it is gone and they can’t reach him. So I made a new website but now we can’t bring down the old one. Is it possible to do so without having the login? Cause they own the business but didn’t do the website…

    • Hi Eliza,

      You will need to connect to your hosting account dashboard. This is where the old website’s files are stored. You may contact the hosting company and ask them for help. There are online tools that you can use to find out where the old website is hosted.

      Admin

  8. I am in desperate need. I cant get back into my wordpress account and everywhere i go for my site it show the 404 file or directory not found
    What do I do?!

  9. Is it possible to get locked out when I’ve tried to log in for too many times? I was creating a code for a modal type login and had to log in and out several times to check. Would that be one of the possible reason why I’ll be locked out?

  10. I work for a medical supply manufacturer. We had our site designed by a web development company. The relationship has ended. We were never given the admin user name and password. Is there anyway where we can get access to the admin features? The developer won’t respond to our calls or messages.

  11. Hello, I just did the move / migration from local to online using all in one migration WP. The website is online, it works but urls dont work my website is still under construction – – – – I can no longer access to wordpress ! – – – – I know I have to use id and password I used working in local but because it was saved in my internet browser I didnt have to enter it each time and I completely lost / forget it ! ANd I dont think changing it on localhost/phpmyadmin/ can be a solution because the migration has been done (?) PLEASE help me to find a solution – save my life — the website is for a client – it’s an urgency. Thanks

  12. I just switched my website over from WordPress.com yesterday. Everything was working fine or so I thought. Today I tried to log into my site via the /wp-admin/ page, but it is telling me that my e-mail, username, and password are all invalid. I tried to reset the password, but it told me there was no account linked to the address or the username.

    I KNOW I am using the right information. I have tried to login on my phone, through the app, and on my computer. The only way I can get to the dashboard is by going to BlueHost and clicking on “My Sites.” It doesn’t even give me the option to log into WordPress from there.

    I am so frustrated. PLEASE HELP!

  13. I changed phone #’s so I cannot get back into my worpress account as everything they wanna send me is on my phone?!

    Now what?

    Word press has no email help?!

  14. I am not able to access website admin page (wp-admin) which is built on wordpress. it shows 404 not found when i typed mywbsite/wp-admin/. Please assist

  15. Every time i wish to access my wordpress dashboard which is installed in a namecheap hosting whenever i put my user ID and password then this message appears : You have been locked out due to too many invalid login attempts. Can anyone give me a solution

  16. Hi,
    I have a weird issue with my wordpress account.
    I logged out and now that I want to log in again it says that my username and email don’t exist in wordpress, what can I do about it?

    Thank you.

  17. I am having a very weird issue.
    I have dpwnloaded a plug in for my website which shows my website in under construction mode.
    I kind of lost my password, and when i go to the lost password it redirects me to the under construction page.
    Also I am using site ground hosting.
    So i am completely blocked out i am not able to recover my wp dashboard

  18. I cannot access my blog nor login to wp panel, but when I use a different Internet connection it works. So how to solve this if it has something to do with a particular connetion?

    • Same happened to me. I can’t access wp-admin page from my intetnet connection but when I use other internet connection or VPN, it opens. Please give me a solution.

      • same with me… is related to the internet. with data is ok and other people can access. but i can access other wordpress accounts I have without problem… the issue is with one particular account

  19. Hi
    I’ve locked myself out of my site. I had it offline on a local host while I was building it. All was fine it was the day to upload and do a paypal sandbox text. I uploaded all files to my host server, all good. But when I went to my website it wasn’t there just the host screen. I watch some videos on YouTube to get advice and one said change the URL in your WordPress dashboard. So I did and now when I got to login to my WordPress site it says it’s not there. Any help would be most appreciated
    Thanks
    Joni

  20. Hey when i log on to my WordPress website it takes me to my website instead of my dashboard and when i click on dashboard to edit my website it just refreshes the page

  21. here i have a blog when i move to admin panel of my blog, after login , work properly then suddenly automatically my admin panel down and even blog also can’t access, but when i use another network its normally open and move to again admin panel, same problem issue…

    and hosting admin panel also blocked at same time

    i dont know what is this

  22. Hello – I don’t know if you can help me. I had a personal site & blog with a domain hosted through godaddy. Some time passed and I apparently forgot to renew my domain subscription – and I lost my rights to this domain. (I can currently buy it back for $1500- yikes). In any case, I’m fine with changing my domain, but in the meantime I want to access my admin dashboard to access what I had on my wordpress page (pictures, blogs, content, etc). I can’t use the normal log-in as I no longer have the domain – is there a back door to access this?

  23. I do not know what the error code is: my website says: Parse error: syntax error, unexpected ‘<' in /home/christoe/public_html/wp-includes/bookmark.php on line 26

    I set up FTP, etc, but I'm not sure which one is line 26, and I do not know what the exact error is. I did not change the code in the first place. as I believe I was hacked. so I have no idea what is correct and what is incorrect code?

  24. I used WP Clone plug-in to copy my site to a new domain so I’d have less work to do to start off but now whenever I try to get to the log-in page it says my IP has been blacklisted, please help!!!

  25. In my WordPress site, I am not able to access the customize function. Each time I click on that it presents a blank screen. What should I do?

  26. I cant get into my wordpress now. It keeps telling me to “enable cookies”. Well, I tried to enable cookies for my website name and for wordpress but it didnt really specify what address it needed to be enabled for but regardless it still gives me the error message. That was on Chrome. So I tried on safari and now it’s telling me my password is wrong when I know for a fact it’s not wrong because I just changed it due to it telling me my password was wrong before the “cookie” error. Im thinking that WordPress just wants to see me suffer..

  27. I just activated the woo commerce site earlier today and it was giving me an internal server error every time I tried to do something so I deactivated it. I just reactivated it because I’m trying to set up my store on my site and the same thing happened only now I cannot log into my site at all I’m completely locked out all it says is internal server error and I can’t find a way to get in touch with anybody to fix it!! please help me somebody!!

  28. Hi,

    I’ve followed all instructions relating to the above – many thanks so far!

    But i’ve hit another wall… Parse error: syntax error, unexpected ‘$atts’ (T_VARIABLE), expecting ‘{‘ … on line 126.

    Problem is, there is no code on that line at all. I’ve been on this for the last couple hours and can’t seem to crack it. I was playing around with the code before as it was bouncing me around to different lines of code where paste error syntax codes were but started again from the original ‘broken’ code and i’m left here.

    Any help would be great!!

    Thanks so much.

  29. Hi there.

    I made an error now I can’t log into my WP admin panel.

    How my error happened:

    When I was logged in to the Dashboard I went to Settings, General, and changed the email address in both the WordPress Address (URL) box & the Site Address (URL) box, then saved, then I causing me to lose access to my admin panel & get this message when I try to log in.:

    “Error 404 – Not Found

    The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.”

    When I FTP into my domain I don’t know what to change or how to change it.

    Can you help me?

    • Hi Donna,

      You can try this. Connect to your website using FTP and look for wp-config.php file. Download this file to your computer and open it in a text editor like Notepad.

      Locate the line that says ‘/* That’s all, stop editing! Happy blogging. */’

      Just before this line add this code:

      define('WP_HOME','http://example.com');
      define('WP_SITEURL','http://example.com');

      Replace example.com with your website’s address. First try with www. and if that doesn’t work try without www.

      Save the file and upload it back to your website’s root folder using FTP.

      Hopefully this will resolve your issue.

      Admin

      • I have the same issues with Donna and followed your suggestions but unfortunately, it still doesn’t work. It still saying a not secure on the address bar and 404 error. Hoping for more suggestions. Please, please, really need your help.
        Thanks a lot, really.

  30. I apologize if this is an easy fix that I’m missing but I simply went to update WP and this error appeared, locking me out….

    Fatal error: Call to undefined function wp_raise_memory_limit() in /home/content/w/h/i/example.com/html/wp-admin/admin.php on line 141

    It’s been so long since I originally installed WP, I don’t remember how to do any of this…..please HELP!

  31. Hi, I locked out from my admin page.
    I mean, I already change the admin url and cannot remember it.
    How to change or check the admin url?
    Maybe from phpmyadmin?
    Thanks.

  32. When visiting the admin url I just get a white screen that says ‘admin access disabled’

    I’ve tried deleting the wp-login file and uploading one from a fresh copy of WP, I’ve tried disabling all plugins (by renaming the plugins file in cpanel), I’ve tried clearing all cache and cookies…. I’m all out of ideas!

    Any help would be appreciated!

  33. I am having strange issues on some wordpress sites. I have around 70 of them.. but for some of them i can not open admin panel on my laptop. though all works fine on mobile.

    I tried proxy tunnel software, and it opened..but on my normal connection the admin page redirects me to broken connection page. however, with same connection i can access wp-admin page using my mobile. any solution?

  34. When I click on my admin access, I get a black screen with a picture of a gun and creepy music plays. How to I regain access to my site?

  35. My Color Magazine site will not let me change or ad widgets. When I go to “manage in customizer” I get this long error code:

    Edit Add Google Analytics Stats
    Google Analytics Stats

    Fatal error: Uncaught exception ‘Google_AuthException’ with message ‘Error refreshing the OAuth2 token, ………….. Array) #4 /home/content/56/9312256/html in /home/content/56/9312256/html/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php on line 288

    Help, please. Thank you

  36. Hi normally when ever i go online to my website, it is normally already logged in to wp-admin. A couple days go i tried to go onto it and it was logged out. So i try to log in and this was unsuccessful. I try logging in using wordpress..this also didnt work. I get this error – ‘Error, invalid response data’. What can i do to fix this problem?

    Thank you in advance

  37. No matter how I try to access my dashboard, I get a simple white page with the word “error” in the upper left hand corner. I’m seeing the error :locked out due to too many login attempts” but I haven’t logged into my account AT ALL in over a month.
    iThemes seems to cause more trouble than offer any security, because the spam comments and constant “new user registrations” keep coming, but my legitimate access of my dashboard is denied.
    NOW WHAT?!?! Thanks!

  38. I had someone to build me a site. Well he did and messed me over on it. He set my privileges to certain things and really did a crappy job with my site. I can’t do anything to it or with it. He has administrator privileges and Won’t let me have them. Is there a way to take it over change passwords and have control of my site? I have paid him all I intend to which was an agreed upon amount. I just want a way to have full control of my site.

  39. I constantly have someone hacking into my site. They apply words into my content that leads to other sites selling cigarettes etc… I have had numerous different experts fixing it, but it never lasts. It is being hosted through Godaddy. I have also called them, but they keep trying to sell me more security. The experts I hired have added different security, but it doesn’t seem to last. My contact form doesn’t work either, when you fill it out it always says failed to send. I don’t know what else to do. Please help. This website is costing me a fortune.

    • Hey Brenda, we are going to publish our complete step by step WordPress security guide in a couple of days. Please subscribe to our blog or follow us on Twitter or Facebook so that you are notified when we publish it. It will help you learn how to secure WordPress like a professional.

      Admin

  40. Hi,
    i messed up my code in the functions php and can’t access my site anymore. Sadly i was stupid enough not to save a copy of the original code. What shall i do? Any suggestions ? Being new to all this, im kind of desperate ;)

  41. I messed up the functions section and now the site is broken and apparently I can’t change the code in my WordPress admin. I also can’t access the site via the FTP program (it can’t connect me to the server) and I don’t know what to do.

    • You can also access your website using File Manager. It is a web based FTP program that you can access from your web hosting dashboard. Simply login to your hosting account and on the cPanel dashboard look for File Manager.

      You can also contact your hosting provider to help you fix this issue, or send you FTP credentials.

      Admin

  42. i my problem is my website suddenly is not opening and its now showing password and a tab it was working properly till this afternoon and suddenly it was like that the site is asking for password not event letting me go to the wp-admin page. kindly help

  43. Awwww… Great…..

    Thank you…Thank you ….Thank you so much

    Went to exactly same problem as you mentioned and overcome by following steps mentioned by you…

    U R Great ….Thank you again

    God Bless you

  44. Hello there,
    My problem is falls on this topic but I’m facing another problem when I try to login my admin panel dashboard. It shows simple Page Not Found error and shows redirection search page.
    Please fix.

  45. I recently installed a plugin to a website I am currently designing for a client and now am locked out of the wp-admin area. I cannot be able to login to the site’s C-panel so that maybe I can delete the plugin. The error that shows up is:
    Fatal error: Call to undefined function et_get_option() in /home/firetech/public_html/wp-content/plugins/DiviLogin/main.php on line 19
    How do I get out of this.

Leave a Reply to Gazi Sharin Mostafiz Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.