I frequently log in to my various WordPress websites from different locations and IP addresses. This results in some of the security plugins, like WordFence, locking me out when I try to log in. I then get an error that says, “401 unauthorized. Proper authorization is required to access this resource!”
What the frick is that? It seems like a file permissions issue to me, but it has happened more than once on my Namecheap hosting environments.
The only way I’ve found to remedy this silly issue is to go to my Filezilla FTP client and CHMOD some folders and files in my WordPress directory.
If you don’t know how to CHMOD your files, YouTube that real quick.
- CHMOD 755 for folders – recursively only for the main WordPress directories.
- CHMOD 644 for files – recursively only for files, only necessary if the first step doesn’t allow logging back in.
These commands could take a while if you have a big website, so be patient. After running these 2 configurations in my FileZilla FTP client, I can successfully log in. This is what works for me to get rid of the 401 unauthorized error message when logging in from a new location. I think maybe WordFence is locking some folders down when it detects my account trying to log in from a new dynamic IP address.