While WordPress is an incredibly powerful platform, it does come with its share of occasional frustrations. One potential source of grievance amongst WordPress users is the inability to log into the WordPress admin area. There are many reasons why WordPress login issues might arise, some more common than others.
This article will highlight some of the most commonly experienced login issues, explain why they might occur, and offer appropriate solutions.
Subscribe To Our Youtube Channel
1. Lost or Forgotten Password
This is an obvious one, of course, but nonetheless an important problem. If you change your password regularly to help with site security, it’s very easy to forget or lose track of your current password. While WordPress has a built-in feature to help you reset your password, there are a number of factors that can derail that process. As a result, there are actually quite a few different potential solutions that you may have to run through.
Solution:
If you’ve lost or forgotten your password, first try using the built-in recovery feature. Click on Lost your password? on the login screen and you will be prompted to enter your email address. WordPress will send you a link via email which you can use to create a new password.
If for some reason, you can’t use this method, there are two other tricks you can try.
First, if you’ve used multiple browsers or devices to log into WordPress, check to see if any of those browsers or devices are still logged in. Then access the admin panel and change your password.
If that doesn’t work, your next best option is to update your password directly in the WordPress database. If your site is hosted on a Linux server, you will usually have access to phpMyAdmin. However, before you edit your WordPress database, create a complete backup. Then, proceed on to the following steps:
- Launch phpMyAdmin, locate your site’s database, and open up the
wp_users
table. - In the list of users, locate your username in the
user_login
column and select Edit next to that row. - Find the
user_pass
field and type a new plain text password into the Value field, replacing the existing symbols and characters. - From the drop-down menu, select MD5.
- Scroll to the bottom of the page and click Go.
At this point, you should be able to login using the new password you just assigned to your WordPress username with phpMyAdmin. However, if you’re still locked out and unable to recover your password, there are several additional options you can try.
2. Cache and Cookies
Cookies are small files located in browser directories that store information about a user’s interaction with specific websites. WordPress requires the use of cookies during the login process. If cookies are not enabled, WordPress login can’t occur.
The browser cache refers to the temporary files stored on your web browser when you access a web page. If your cache is not updating properly you may be viewing older versions of some of the files that support WordPress.
Solution:
Luckily, cache and cookie issues are usually easily fixed. First, check that cookies are enabled and then clear both your browser cache and cookies.
3. Plugin Interference
It’s possible for a plugin to interfere with the login process. A plugin may not have been updated properly, or there could be a conflict between two or more of your plugins.
Solution:
The first thing you need to do is confirm that the issue is being caused by a plugin. You can do this by deactivating all of your plugins or by temporarily renaming the plugins folder.
If you have access to your admin panel, simply go to the Plugins menu and deactivate all plugins. Make sure to back up your site first. Select all of the plugins, go to Bulk Actions and select Deactivate.
If you don’t have access to the admin panel you can rename the plugins folder. Use a File Transfer Protocol (FTP) client, locate the wp-content/plugins folder, and rename it temporarily.
WordPress won’t recognize the folder and will deactivate all plugins.
Once you have deactivated all plugins, try logging in. If you’re now able to log in, you’ve confirmed that a plugin is causing the issue. If so, you’ll need to troubleshoot to discover which plugin is causing the issue. You can take a look at the “Check Your Plugins” section in this blog post for more detailed instructions.
4. Theme Issues
Theme issues can cause login problems, especially if your theme includes a custom login page. This issue is most likely to rear its head when a problematic theme update is installed, or when the WordPress core is updated producing a theme incompatibility.
Solution:
Determine if a theme issue is causing your login woes by reverting back to the default theme. To do this, temporarily rename your active theme’s directory so that WordPress doesn’t recognize it.
You can do this by accessing the wp-content/themes folder using an FTP client, finding the active theme’s folder, and renaming it. This will force WordPress to revert to the default theme.
Now, try logging in to confirm that the theme is the issue. Also, take a look at the “Check Your Theme” section of this post for more details.
5. Corrupted Login File
If the WordPress login file, wp-login.php, is corrupted, deleted, or misplaced, you won’t be able to access the login screen at all.
Solution:
To check if this is the problem (and to simultaneously resolve it) you will need to replace the file with a new one.
- Backup WordPress before deleting your login file.
- Locate your wp-login.php file with an FTP client and delete it. You’ll find it in the directory where you’ve installed WordPress.
- Next, download the latest version of WordPress and locate the wp-login.php file in the new download.
- Copy this file in place of your deleted file.
- Open the new login file and search for “redefining user_login.”
- Just below a php comment beginning with that phrase find and replace code as shown in the snippet below.
// Delete this line $user_login = $user_data["user_login"]; // Replace it with this line $user_login = $user_data->user_login;
If the login file was the issue, you should now be good to go.
6. Redirected WordPress or Site URL
The WordPress address URL identifies the location where WordPress is installed while the site address URL identifies where your website should resolve. If either is wrong, it can cause all sorts of issues, including the inability to access the admin area to correct the mistake.
This can happen if you have recently migrated WordPress, altered the location of the WordPress core by moving WordPress to a subdirectory, or it can simply be due to an errant keystroke while working with your WordPress database.
Solution:
There are lots of potential solutions when it comes to fixing the WordPress address and site address URLs. However, there is a simple (albeit temporary) trick to enable you to confirm that you do in fact have a URL issue on your hands.
After backing up your site, access the wp-config.php file with an FTP client and add the following code:
define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');
Making sure to use the WordPress address URL for WP_HOME
and the site address URL for WP_SITEURL
. By default, both addresses will be the same. However, if you’ve given WordPress it’s own directory, the WordPress address URL will include the directory in which you’ve installed WordPress.
Save the updated wp-config.php file and upload the modified file to the server using your FTP client. If you can now successfully log in, then you’ve identified the problem.
However, this is a temporary fix so you should delete the added code and update the WP_HOME
and WP_SITEURL
values in your site’s database using another method to correct the issue permanently.
Conclusion
Having WordPress login issues can be the source of much frustration and result in countless hours of troubleshooting. As you can see, there are lots of potential causes of login problems so it can be difficult to know where to start.
Let’s quickly recap the solutions to run through if you’re having issues:
- Change your password.
- Clear your browser cache and cookies.
- Deactivate your plugins.
- Revert back to the default theme.
- Replace your login file.
- Define the WordPress and site URLs.
How many of these issues have you come across while working on your WordPress site(s)? Let us know in the comments section and don’t forget to subscribe so you can follow the conversation!
Featured Image via hanns / Shutterstock.com
Thank God I never had any trouble with my login! Anyway, I will bookmark this page. You never know when you are going to need it! Thanks!
Thanks, Jordan!
I’m having hard time understanding how login works in WP. I’m close to uploading my first ever website using Divi to GoDaddy site where old design sits, but trying to craft nice login box on home page so fellow nonprofit board members can look site over, comment, and edit.
You say “custom login page” can be problematic. I’m using Divi login module—does that count as custom?
Does one have to make two login boxes, one for Admins and other for members or will Divi’s assigned “Roles” automatically define access so one box world for all???
I also don’t understand Divi’s “Redirect To The Current Page” means? Back to page one started on? That doesn’t make sense if login box is on same page.
How do I make a horizontal login in Divi so its all one one short line?
Hi,
I suggest you visit the Divi community on Facebook to get answers. They’re quite helpful. https://www.facebook.com/groups/DiviHelpAndShare/
Good luck!
Hello,
You’ve certainly got a lot of questions that you need answers to – so I’d recommend dropping us an email, and we’ll be able to answer them. 🙂 You can find the form here – https://www.elegantthemes.com/contact/
Good luck. 🙂
I have been having Cache and Cookies issues with two specific sites all the time.
all site I have my login name and password save so all I have to do is click login.
on the two sites I’m having a problem with I have to type in my name and password or pick it from saved names and the password then hit login.
90% of the time it will login the other 10% it will get the error about cookies.
I’m sure cookies are enabled and I have tested with all plugins disabled same problem.
I have lived with it and know that when I go to these two sites I have to manually type it in or pick it from a drop down of saved usernames. that’s Life
thank You for the article
Hi Mitch, I have had this problem too (enable cookies error), and only with specific sites. Finally I found out that it works most of the time if you just repeat the login process (typing in both fields again and hit return).
Hi John, maybe you or someone can help me? I used something to change my login url.
Instead of site.com/wp-login, it’s site.com/and a bunch of random characters.
It’s meant for my safety and privacy. BUT I have NO idea how I set it up. I’ve looked at plugins, but can’t figure it out.
ANY clue? Vague, I know. But that’s all I know.
I’ve changed passwords in phpMyAdmin or whatever that is called. It’s early, my brain still reeling from today’s news. TIA.
Hi Jenny, it sounds like “hide backend feature” in iThemes Security plugin that lets you add a login slug. If you are using that plugin just go to iThemes settings and make sure you click on “All” to show all features, hope that helps
GUYS i also found i had some problems with a certain subset of sites that i was working on. I do production for several ad agencies and i found that ONLY the sites from one agency gave me error message after error message when I’d try to log in. THOSE SITES WERE ON A WINDOWS SERVER WHICH WAS RUNNING SOME KIND OF EMULATOR. All my other sites were on a Linux server. I still don’t know how to fix those sites because i got so frustrated that i finally moved all those sites over to a Linux server and no longer have any log in issues! Good luck. Emily
That’s interesting Emily. I use an emulator to develop sites locally: Instant WordPress. Can you find out which emulator was running on the server? it would we quite helpful to know. Thanks for posting.
Dawn
I loathe, absolutely and completely loathe plugin related login errors.
You find, download, and install what you believe to be an amazing plugin that will no doubt help your website immensely! You then proceed to activate it.
All goes well.
Then you test that everything is working. Sure. Easy. No problem. Everything working fine.
So you go to sleep/work/etc., and get logged out. You try logging back in when BAM! You get all kinds of plugin errors, and you have to go through the process of disabling/uninstalling everything through FTP/phpMyAdmin/whatever else you use.
FRUSTRATING!
Very frustrating, Lyle! Hopefully we’ve been able to help you out at least a little. 🙂
The only login issues I ever have are when I’m using the Divi 100 custom login page. OH THE IRONY!
Arby, drop us an email (https://www.elegantthemes.com/contact/), and we’ll take a look at the issue for you. 🙂
I recently faced the issue when my Jetpack plugin blocked my IP and Google Captcha installation caused problems while logging in. I had to remove that plugin then.
Wow – big problems! Glad it’s sorted for you though, Karan. 🙂