Case insensitive login usernames in WordPress
First published on December 4, 2008
Update: WordPress 2.8 and up allow case-insensitive login usernames by default. Therefore, you only need the plugin described below if you are using a version older than WordPress 2.8.
In WordPress, if your username is “Peter”, you cannot log in with the username “peter” or “PETER” or any variation with different letter cases. Since usernames in WordPress can only be changed by editing the database, this case-sensitive behaviour is potentially problematic, especially if you run a site where registration is open — you are likely to run into complaints from people who think their password needs to be reset when they’re simply using the wrong case for their username.
While case-sensitive passwords represent an important security feature, the extra security from having case-sensitive usernames might not be worth the potential inconvenience.
Luckily, the WordPress function for login authentication can be overridden. I’ve created a plugin that overrides this function with a very small tweak to accept a case-insensitive username. It should work on WordPress versions 2.5 through 2.7.
To install the plugin, simply unzip the file to the WordPress plugins directory and activate it. Then, a registered user with the username “Peter” can log in with “pEtEr” if they want.
Download Peter’s Case Insensitive Login plugin
December 9th, 2008 at 2:32 am
Dgold says:
Extreme cool, fast easy install. Thank you Peter. This plugin was needed for a site that has a lot of novice subscribers and registered users. This will really help me, the Admin, be more confident that the users are getting in without risk from mis-capitalizing their login name.
January 2nd, 2009 at 12:28 pm
Kenton says:
This really helped me. Thank you SO much.
January 9th, 2009 at 1:30 pm
habby says:
Thanks for the plugin I am going to try it out. But I am just wondering where I had seen that plugin to text comments from your cell phone ?
Thanks again for the really useful crap !
January 9th, 2009 at 2:51 pm
Peter says:
Hi habby, unfortunately I don’t know what plugin you are referring to. Such a plugin probably exists somewhere, though
January 10th, 2009 at 5:32 pm
Manuel says:
Thank you very much.
February 5th, 2009 at 8:33 pm
Dennis says:
THANK YOU!!!!
April 15th, 2009 at 10:46 am
Wes says:
Thanks a ton, works great!
May 26th, 2009 at 12:50 pm
James says:
Cheers man!
I can’t understand why you’d want case-sensitive usernames in the first place, and I don’t know why they haven’t "fixed" it yet!
August 20th, 2009 at 11:16 pm
Carlos says:
Hey Peter – After updating WP to 2.8.4, the plugin is now making the login page to automatically display the ‘empty_username’ error message…
I’ve tested this in a couple of sites and all seem to have the same problem…
Thanks anyway for a great plugin, it’s been very useful so far
Carlos
Reply from Peter: Thanks for pointing that out. The good news is that you no longer need a plugin for case insensitive username logins, as WordPress 2.8 introduced that functionality into the core!
August 23rd, 2009 at 3:11 pm
Carlos says:
Wow, I didn’t know this is part of the core functionality!
Thanks anyway for the plugin Peter, it was very useful and it’s great to see the functionality has been added to WP
C
December 8th, 2014 at 8:23 am
Daniel Smith says:
This plugin does what it says it does. BUT!!!!!!
When enabled, this plugin bypasses Authy two-factor authentication, MAJOR SECURITY ISSUE!!!!!!!
Peter, if you read this, please let me know somehow if you can fix this bug, since I like the case insensitive, but i need Authy two-factor.
Thanks,
Daniel Smith, KV4LQ
Reply from Peter: Thanks for pointing that out. However, since case-insensitive login is part of WordPress 2.8+, my plugin should no longer be necessary.