
WordPress login problem – help, I’ve locked myself out
I’ve had that problem before. As so often, I followed my blog’s link to wp-admin, quickly typed in my username and password and then… nothing, wrong password. Can not be written again slowly, but with the same result.
WordPress won’t let me in anymore. There are a few reasons why the way to the backend can be blocked. I will introduce you to typical sources of error along with the appropriate solutions.
The wrong password
Even though you entered the password exactly, it will be declared as incorrect. After a few tries, the next step is to click Forgot your password? and requesting a new password. If this way doesn’t work, WordPress isn’t working properly or you’ve been hacked.
Whatever the reason, luckily you can also manually reset your password.
To do this, call up phpMyAdmin via your hoster. The program allows to maintain and configure the MySQL database. If you are shown multiple databases, first look in the wp-config.php of your WordPress installation, which contains the name of the database that is important to you now.
In the list on the left, find the entry that contains the word Users, such as wp_users. You can see the users of the WordPress installation, including their password and other user data.
Select the desired entry and go to To edit. There are numerous characters in the password field that appear to have nothing to do with your old password. This is because WordPress stores the passwords as a so-called MD5 hash instead of plain text.
You must therefore use an MD5 generator to generate the password. I recommend md5-generator.de. Provide the new password, copy the MD5 version and paste it into phpMyAdmin. Confirm about Save on computer. Of course, when logging into WordPress, you use your normal spelled password, not the MD5 version.
White Screen of Death
If you’re facing a whitewashed page under wp-admin, you’re about to encounter the dreaded “White Screen of Death”. It can be triggered by a poorly programmed plugin or theme, or by a bug on your host. If you have other WordPress installations running from the same provider and they work, you can exclude the hoster. Even if only individual pages are affected, this tends to indicate a plugin or theme problem.
Often it is the memory that is exhausted. You may also know the message “Fatal error: Allowed memory size of XY bytes exhausted”. Then you could add the wp-config.php around the line
define('WP_MEMORY_LIMIT', '64M');
(before the line /* That’s it, stop editing! */). This raised the memory limit to 64 MB. If the error persists, ask your host what is going wrong. The php.ini will then probably be adjusted to increase the memory limit for you. And not everyone has access to it.
However, you could create a .htaccess file to control it. The following is written in an editor:
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
Then save the file as .htaccess and store it on the server (on the same level as the wp-config file).
If all of this doesn’t help, the problem isn’t the memory, but possibly one of the plugins. There are extensions specifically designed to secure the WordPress system that sometimes work too strictly and even lock you out. A cache plugin that got lost or a login screen beautification plugin is causing problems. A test provides information: log in via FTP and change the name of the plugins folder to plugins.deactivated. You should now be able to log in again.
Unless it’s your theme, not the extensions, that’s causing the trouble. Then you should backup and delete the folder with the currently active theme. WordPress will automatically jump to the default theme. A badly programmed functions.php is often the culprit. Even if it’s just an empty paragraph at the end that causes problems.
The last point to be mentioned is the possibility of a failed WordPress update. So that not all files were replaced cleanly. Then transfer the new version manually via FTP, leaving out the wp-config.php file.
database connection
You may not be able to log in because WordPress is unable to establish a database connection. What can be the reason? It could be that the database login data is wrong or has been changed (compare the entries in wp-config.php with the access data of your database), the database server is not responding or the database has even been damaged.
In these cases, ask your host before you take the next step. If the error appears on the homepage, as well as in the backend under /wp-admin, you could add the wp-config.php to the line
define('WP_ALLOW_REPAIR', true);
expand (before the line /* That’s it, stop editing! */). Then navigate to your page via .
A warning: anyone could now go to this page and select the options. WordPress is currently assuming that we cannot log in (= identify ourselves). But only you were able to enable this option by changing wp-config.php. After repairing and optimizing the database, you should therefore remove the line as soon as possible.
I’m no longer an admin
If you no longer have any admin rights, you have probably been hacked or there is an error in the database. You call up phpMyAdmin via your hoster. Select your database and go to wp_users in the list on the left.
Go to Insert there. Some user data is requested. This includes an ID (sequential number), user_login (your name), user_pass (your password as an MD5 hash), user_nicenam and display_name (the name that appears on the homepage, e.g. for an article) and user_email (your email ). Set user_status to 0.
It continues via wp_usermeta. You provide the user_id you just chose, then as a meta_value:
a:1:{s:13:"administrator";s:1:"1";}
After confirming you have created a new username. Now it should be possible to log in again via wp-admin with the new username and password.
No more fear of WordPress login problems
As you have seen, there are many reasons why you can no longer access your WordPress installation. But you can test anything and do a lot as long as you keep control of the hoster’s database via phpMyAdmin or your service provider can make these changes for you.
One last tip at the end: Create a second account with admin rights. This is often the simplest solution if your usual access locks you out.
Workshop report 🔧
In the featured image I use the following Google fonts: Francois One and Roboto. I found the lock and key photo on Pixabay.