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


11 Responses to “Case insensitive login usernames in WordPress”

  1. 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.

  2. Kenton says:

    This really helped me. Thank you SO much.

  3. 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 !

  4. Peter says:

    Hi habby, unfortunately I don’t know what plugin you are referring to. Such a plugin probably exists somewhere, though :D

  5. Manuel says:

    Thank you very much.

  6. Dennis says:

    THANK YOU!!!!

  7. Wes says:

    Thanks a ton, works great!

  8. 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!


  9. 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 ;)


    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!

  10. 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 :)


  11. 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.

    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.

Speak your mind

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word