Why Restrict Usernames in WordPress?
When running a WordPress membership website or a community website, you’ll need to allow user registrations. When you do, new users can pick any username and email when they sign up.
That means that users can pick a username similar to the admins, moderators, and support staff. They could even pretend to be a member of your team, leading to a WordPress security risk.
Not to mention, users could also use offensive words or trademark words when registering an account on your WordPress website.
That’s why it’s best to restrict subscribers from using certain words in usernames and email addresses. It prevents the use of foul language and helps maintain high standards on your forums and communities.
Let’s see how you can limit usernames in WordPress.
Restricting Usernames in WordPress
The best way to prevent the use of certain words and phrases in usernames is by using the Restrict Usernames Emails Characters plugin.
It’s a free WordPress plugin that allows you to restrict certain usernames, email addresses, symbols, domain names, and more. The plugin even offers an option to allow the use of a certain language, like Latin, Arabic, Cyrillic, or any language.
First, you’ll need to install and activate the Restrict Usernames Emails Characters plugin. If you need help, then please see our guide on how to install a WordPress plugin.
Upon activation, you can head over to Settings » Restrict Usernames Emails Characters from your WordPress dashboard. Under the ‘General Settings’ tab, ensure that the plugin is enabled.
After that, you can scroll down to the ‘Not allow these names’ section in the plugin and enter words or phrases to restrict their use in usernames.
There’s also an option to ‘make lowercase equal uppercase’ in the plugin. By default, it will be enabled, but you can disable it from the dropdown menu.
Similarly, you can also prevent the use of specific email addresses.
Under the ‘Not allow these emails’ section, simply enter the email addresses that users can’t use when registering. This will help filter out spam emails, and users will have to use their actual email addresses.
Besides that, the plugin has more optional settings to customize the restrictions on usernames and email addresses.
For instance, you can prevent the use of certain email domains, restrict usernames containing certain words, avoid the use of characters and symbols that WordPress permits, and allow special characters.
There are even options to limit the use of spaces in usernames, don’t allow users only to use numbers in the username, stop uppercase usernames, and more.
Don’t forget to click the ‘Save Changes’ button when you’re done.
Next, you can go to the ‘Error Message’ tab in the plugin.
The plugin will already have pre-written error messages for different situations by default. However, you can customize any error message under this section.
Now, if someone tries to enter a restricted username and email address when registering for your website, they’ll see an error message and will have to pick another username and email.
Here’s what it looked like on our demo website when we tried to register using a restricted username and email address.
We hope this article helped you learn how to restrict usernames in WordPress. You may also want to look at our guides on how to start an online store and the best AI chatbots software for your website.