So your users, subscribers, customers can’t log in to your WordPress website – but you, as an admin, can? Your users are requesting new passwords but when they enter their log in details the page just refreshes. Does the user log in page or (My Account page for WooCommerce customers) just reloads with no error message? This is not helpful – for you or your users. Read on to find out my solution…
I recently stumbled across this issue whilst migrating a WordPress website to a new server. If you are facing this issue it’s likely you’ve also moved your website, changed hosting provider or recently restored your website from a backup. When I first faced this issue, I followed the usual routine of re-saving my permalinks – but to no avail.
NOTE: To re-save your permalink settings, log in as an administrator and go to Settings>Permalinks. You don’t need to change any settings – just hit the update button.
With minor redirection issues this usually solves the problem – but this one I felt was something uglier. However the solution was both interesting and simple, hence me writing this blog post to help you guys out!
The solution
What you need to do is delete your .htaccess file first! Then update your permalink settings. Without an existing .htaccess file, when you re-save your permalink settings the server generates a shiny new one, free of any possible corruption or permissions issues – cool!
What is a .htaccess file and what’s in it?
.htaccess files (or “distributed configuration files”) provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof. – Source Apache Server Tutorial
Essentially your .htaccess file is a text configuration file for communication between your website installation and the server. It will include instructions and specific permission settings for your website to work.
Below is a basic one, configured for a WordPress website.
How to find and delete your corrupt .htaccess file
Your .htaccess file lives on your root directory of your website. To delete this you need access to your website’s file structure. This can be done is several ways.
Option 1: Log in to your hosting provider’s control panel and locate the File Manager section. Navigate to your root directory (this directory will normally contain the folders: wp-admin, wp-content and wp-includes unless your installation lives within a root subfolder)
Option 2. Log in to your website file structure using an FTP client. This is a handy bit of software for your computer to access remote servers. We recommend you try FileZilla. Another highly recommended option is Transmit. Once you’ve downloaded and installed the software you’ll need to enter your ftp (File Transfer Protocol) log in details. These can be usually found or created on your site’s control panel.
I’m looking but I can’t find the .htaccess file? Is it hidden?
If you cannot see this file try changing a visibility setting to “show hidden files” or something similar. In some cases, whilst on a Mac or using ftp clients, certain files are hidden by default.
In FileZilla you may need to go to View>Filename Filters (command-i) and untick the Configuration File filter in the remote filters box.
In Transmit you need to go to View>Show Invisible Files (shift-command-b).
PLEASE NOTE: Not all servers are configured the same. .htaccess files are fairly universal but won’t be used on all servers. You may have to ask special permission from your hosting provider to enable access. Learn more here (Warning! Only intended for geeks eager to acquire “mad skills”)
Recap: How I solved the “WordPress users can’t log in” issue
- Find and delete your .htaccess file (lives in your website’s root directory)
- Log in to your website as a WordPress administrator and update your Permalink settings (Settings>Permalinks).
- Do a hard reset of your web browser cache and logged data. Also tell your users who are still struggling to do the same.
If you found this post useful let me know in the comments below. Thanks for your support. ^_^
Thanks for your support!!! It worked for me ;)
Three years later and your fix did the trick!!
Awesome, thanks!
After hours of troubleshooting – This finally saved us!!! Thank you so much!!