What to Do When You Are Locked Out of WordPress Admin
As the most popular Content Management System (CMS) in the world, WordPress powers around 45 million sites. There are many reasons for this, ranging from ease of use and agility to sheer capability.
Yet as with almost everything tech, all of it can be controlled through one key access point – in this case, the administration dashboard.
Normally, if you keep it safe that is fine, but because WordPress is so simple to use, it is often in the hands of those who might not be very familiar with either technology or the platform itself.
What happens when a WordPress administrator forgets their password or otherwise gets locked out of their own site?
As we go through the following potential issues and their solutions, you’ll come to realise how important access to your web hosting account is. Always make sure that you sign up with a reputable WordPress hosting service provider. Taking the time to find the right fit between you and your hosting provider can help avoid a ton of grief further down the road.
Unlocking WordPress Admin
There can be multiple reasons why an admin might get locked out of their own WordPress installation. These include problems with the forgotten password link, problems with plugins or even database errors.
1. Changing your Password
Let’s handle the most common first – simply forgetting their password. If this happens and for some reason trying to reset it by using the ‘Lost your password’ link fails, it’s time to reset your password in the database itself.
In your web hosting account, look for an option to manage your databases or if there is a direct link to phpMyAdmin, select that. Once inside the database, look for a database entry labelled ‘site_users’ (this usually comes with a wp_ prefix).
Click on your admin username and under the option ‘user_pass’ type in a new password for yourself. Make sure that ‘MD5’ is selected to keep your password safe.
2. Too Many Login Attempts
If you’ve installed some security plugins, sometimes trying to enter an incorrect password too many times will get you locked out as well. Exactly how many times you can try is set in the plugin settings.
However, to work around this, you’ll again need to get in to your web hosting account. Once there, go to ‘file management’ and navigate to the wp-content folder.
Look for the name of your security plugin and change the folder name to something else. I recommend just adding a ‘-bak’ to the end of the filename.
Now you can go back to your WordPress login page and try to log in again.
3. Database Errors
If you are seeing database connection errors across the site, that means you won’t be able to access your WordPress admin panel as well.
WordPress works on two key components – the core WordPress files and the database files. If WordPress cannot connect to the database, then the site will not work.
The solution to this issue depends on the exact nature of the error. For example, if you have just changed your database username or password, make sure to update that information in your wp-config.php file.
Again, log in to your web hosting account and navigate to the root folder of your WordPress installation (this is usually public_html or httpdocs) then click on the wp-config.php file to edit it. In the MySQL settings, make sure that your DB NAME, DB USER, DB PASSWORD, and DB HOST is updated to whatever you have changed it to.
4. White Screen of Death
If you get a completely blank screen when you try to access your WordPress admin panel, this is known as the ‘White Screen of Death’. It basically gives you no options at all and worst of all, can be caused by many things.
The most common reason is simply because of your site has exhausted its memory limits – but it could also be caused by something as minor as an error with a plugin.
To increase your PHP memory limit, again, access your wp-config file, then paste the following code in just before the message that tells you to stop editing; define ( ‘WP_MEMORY_LIMIT’, ‘256M’ );
If that doesn’t work, then access your web hosting control panel and try disabling your WordPress plugins and then enabling them one at a time to see if this resolves the error. One more option would be to change your site theme back to the default one and see if that fixes the problem.
How to Avoid Admin Access Problems
Because there are so many possible problems that can crop up leading to the loss of admin panel access, it would be far too long to list them and the potential solutions out here. Remember, when dealing with any site and web hosting, there are many moving parts – all of which can break at any given time.
To avoid potential problems, do follow some simple guidelines;
- At all cost, keep your web hosting access account safe!
- Be cautious of installing new plugins and read up on them as much as you can before deciding to use them
- If possible, create a test environment with a close of your site to try out new thing before deploying them on your site
- Make sure you choose a WordPress hosting provider that is reputable and can help you out if there are any major issues you might face
- Always keep backups of both your core files as well as database
While losing access to your WordPress admin panel may at first cause your heart to skip a beat, try to relax a little.
Panic won’t help and most problems are easily resolved. Because WordPress is in such widespread use, somebody will have faced whatever you are facing now.
A little time spent with Google can help you resolve most issues and when that fails, there is always your hosting provider to turn to.
Hosting providers who specialize in WordPress accounts often have the added advantage of having WordPress-specialized technical staff on hand to assist their customers with potential issues.