Locked out of WordPress admin panel

If you are locked out of WordPress admin panel, what to do or find out what to do. I will list some of the symptoms and solutions to commons issues why users get locked out of WordPress admin panel. Hopefully, you will never have to read this. Let us see what are the most common issues why you might get locked out of WordPress. What to do when locked out of WordPress?

Locked out of WordPress: Wrong password

Locked out of WordPress because of the password is one of the most common reasons why you can’t login to your WordPress admin panel is that you use the wrong password. You can always click the “lost your password?” link and get your password reset. This requires a few things. You registered your email when you created your WordPress account. Your Sendmail, if you are on Linux or some sort of SMTP server for your WordPress to be able to send that reset mail.

If the mail for some reason doesn’t work due to common errors during WordPress Migration, you will need to go into your MySQL database and reset your password there. The best way to reset your password in the database is to use a tool like phpMyAdmin or MySQL Workbench. If you have SSH access to the database server you can also use terminal and access the database that way. I bit more complicated, but there are tons of tutorials on the matter.

locked out of wordpress password

Admin Privileges is gone

How to access WordPress admin tools when your admin privileges are missing? This is fortunately not as common as wrong or lost password issue. There are only a few ways this could happen. Either someone removed your admin privileges or something changed the settings for the admin user in the database itself. Either way, you should have a backup of your WordPress installation, including the database.

locked out of wordpress 2

If you connect to your database with a tool like MySQL Workbench you can manually check what privileges your user has. Check out the table wp_usermeta, and you will find the privileges for all your users in here. Then we look at the main admin user, the first user created in WordPress. It should have a key value for wp_capabilities like this: a:1:{s:13:”administrator”;b:1;}

locked out of wordpress 3

If the value above is something different. Like something like this: a:0:{}. That means all your roles have been removed. You are not even a subscriber. So how to login to WordPress again? You can copy the wp_capabailities from the admin code above, and past it into your own user. Then maybe think of how to prevent it from happening again.

Blank admin page (White screen of death)

A blank WordPress admin page, or the white screen of death, can happen after doing changes to your WordPress. You enter the WordPress administration URL, and you only get a white screen. It can be compatibility issues in a plugin, bad plugin update or other plugin issues. The more plugins you have, the higher the chance of something like this to happen. But luckily it can be fixed and help you from being locked out of WordPress.

The most common solution to this issue can be solved by disabling all the plugins. Then turn them back on one by one until you identified the faulty plugin. You can read more about that in my article about white screen of death. One of the most common causes of being locked out of WordPress.

Syntax error or PHP error messages

PHP error messages usually come when editing your theme. Unless you are testing your own made plugins or something. But for non-developers theme snippets or changes to the theme is the main cause. This error will not just cause the admin panel to be unavailable, but most likely your entire site. Syntax errors or PHP errors is easiest fixed by connecting the site with FTP. And then manually change or remove the theme. This guy has an article on how to monitor PHP error messages for WordPress.

Error establishing a database connection

Error establishing a database connection message is because your WordPress cannot connect to your database. This message will often not appear only on your admin panel. It will often appear on your entire WordPress site. But that can be a good thing, compared to the alternatives. There are a few things that can cause this error message.

The database server could be down. Are you using a shared web hosting or hosting your own server? If you are using shared web hosting I would contact the hosting company and asked them if the database server was down. Or maybe they even have status messages on their website. Some hosting companies do.

The database could be damaged and needs to be repaired. You can have WordPress trying to repair the database by itself. However, you need to do one change in the wp-config.php file. But only one line of code is needed at the end of the file. Or almost at the end. Just above this line: /* That’s all, stop editing! Happy blogging. */ You can try to paste this code in: define(‘WP_ALLOW_REPAIR’, true);

locked out of wordpress 4

While you are at it with the wp-config file, check the database connection information at the top of the file. You will find the database name, database username, database password and database server address.

Make Backups

The most important thing with running WordPress sites, or any other sites, is to make regular backups. Start doing that before you have to google wp-login not working or how to access my WordPress dashboard. There are tons of backup plugins you can use to make backups. Or even restore your site if needed. Backup plugins are also a nice way to transfer your WordPress site to another host. If you like the same WordPress site running on a home server for testing and experimenting.

Hope you don’t get locked out of WordPress again. Check out my other WordPress articles here.

About Author

Related Posts

wordpress page not found

WordPress page not found after changing permalinks

Permalinks are a critical aspect of a WordPress website’s structure, providing user-friendly URLs that enhance both SEO and user experience. However, occasionally, WordPress users encounter permalink issues…

Your site does not have a default theme

WordPress: Your site does not have a default theme

If you get the message Your site does not have a default theme, it is because you are missing the default theme. The default theme is used…

Change link color Wordpress

Change link color WordPress

Change link color WordPress. Sometimes your WordPress default link colors don’t fit very well on your page. There isn’t any settings where you can change this in…

fatal error out of memory Wordpress

Fatal error out of memory WordPress

Fatal error out of memory WordPress is caused by, as the message says, out of memory. WordPress itself is not memory hungry. According to WordPress memory requirements,…

wordpress admin blank page after login

WordPress admin blank page after login

WordPress admin blank page after login, the first time is terrifying. Since you found this article, I guess that is what you are experiencing now. If not,…

Disable all plugins Wordpress

Disable all plugins WordPress

Disable all plugins WordPress if you can’t access the admin panel. If you experience a white screen of death, or for other reasons can’t log in to…

Leave a Reply