What To Do When You Are Locked Out of WordPress Admin
Last modified: October 4, 2020
Being locked out of your WordPress admin area is a disaster. You can’t add new content to your website, you can’t update and you can’t troubleshoot your website. There are numerous reasons why you might be locked out of the admin area (wp-admin). So, here are a few fixes you can try.
Error Establishing Database Connection
If you’re seeing this error for the whole site and not just on the website’s login page, then it is likely that you’re experiencing an error establishing database connection problem. There are numerous reasons for this but it is most likely due to a corruption of the database.
Your web hosting server might have some issues. If this is the case, then you might want to read this guide on how to fix this issue.
White Screen Of Death
Sometimes you might be facing what is commonly known as the white screen of death on the WordPress admin page. This is usually the case when the website has exhausted the memory limit on server. However, it can also be caused by a conflict between the core WordPress code and a plugin/theme.
There are several solutions that can help you here which are detailed in this blog post.
Incorrect Password Issue
Sometimes you might have incorrectly entered in your username and password combination. This can happen if you’ve recently changed passwords. You might also suffer this if there has been a hack on your website. If you don’t get the chance to reset your password because the resetting password doesn’t get sent to you, then you should reset your WordPress password from the phpMyAdmin file using a FTP program.
This can be very overwhelming for new users, but it is often the best and speediest way to reset your password.
Lost Admin Privileges
There are some instances where access to the admin area is okay, but you can’t see any of the admin options like the plugins, themes, pages or posts. This can happen when your user permissions have been modified, often during a hacking problem.
If this has happened, then you need add an admin user to the WordPress database via MySQL (phpMyAdmin).
Finally, there are sometimes PHP errors that can infect your website. This is normally the case when those new to WordPress use the built in WordPress editor from their dashboard to add in new code. If the code isn’t correct, it can cause PHP errors.
If this is the case, you will need to log into your site via a FTP program and then go to the file that you modified (likely the functions.php) file and then delete all the code that you added in. Ensure the file is saved and the problem has gone away.
Don’t forget that this problem is probably not the developer’s fault. It is hard to code any website, so if you’re new, there is probably something you missed off when you inserted the code to your website. Speak to a seasoned website developer before adding more code to your website to ensure that you’re adding it in the right place.
Final Word: What To Do When You Are Locked Out of WordPress Admin
If you’re locked out of your WordPress admin, you need to take action. The lockout could be the result of a hack or a coding error on your website. Use the fixes above to help you find the problem and resolve it.
A Savvy WordPress developer, years of experience developing for web (PHP, JS, jQuery, Vue, MySQL, etc.), SEO specialist, and more…