How to Restrict Usernames and User Emails in WordPress


Are you looking for a way to prevent users from using specific usernames in WordPress?

If you allow people to register on your website, there is always a risk that people will register usernames that contain foul language, branded words, official-sounding names, or have other problems.

In this article, we will show you how to restrict usernames in WordPress.

Restrict usernames in WordPress

Why Restrict Usernames in WordPress?

When you run a WordPress membership website or a community website, you need to allow user registrations. When you do, new users can choose any username and email address when signing up.

This means that users can choose a username similar to administrators, moderators, and support staff. They might even pretend to be a member of your team, which would pose a WordPress security risk.

Not to mention that users can also use offensive words or brand words while registering an account on your WordPress website.

That’s why it’s best to prevent subscribers from using certain words in usernames and email addresses. This 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.

Restrict usernames in WordPress

The best way to prevent certain words and phrases from being used in usernames is to use the Restrict usernames Emails Characters connect.

It is a free WordPress plugin that allows you to restrict certain usernames, email addresses, symbols, domain names, etc. The plugin even offers an option to allow the use of a certain language, such as Latin, Arabic, Cyrillic or any language.

First, you will need to install and activate the Restrict Usernames Emails Characters plugin. If you need help, please see our guide on how to install a wordpress plugin.

Upon activation, you can head to Settings ยป Restrict Usernames and Email Characters from your WordPress dashboard. Under the “General Settings” tab, make sure the plugin is enabled.

Make sure the plugin is enabled

After that, you can scroll down to the “Do not allow these names” section in the plugin and enter words or phrases to restrict their use in usernames.

There is also an option to “make lowercase equal to uppercase” in the plugin. By default it will be enabled, but you can disable it from the drop-down menu.

Enter names to restrict username

Similarly, you can also prevent the use of specific email addresses.

In the “Do not allow these emails” section, simply enter the email addresses that users cannot use during registration. This will help filter spam and users should use their real email addresses.

Do not allow certain emails

Besides that, the plugin has more optional settings to customize restrictions on usernames and email addresses.

For example, you can prevent the use of certain email domains, restrict usernames containing certain words, avoid the use of characters and symbols allowed by WordPress, and allow special characters.

There are even options to limit the use of spaces in usernames, not allow users to use only numbers in the username, stop uppercase usernames, and more.

Prevent use of spaces and numbers in username

Don’t forget to click the “Save Changes” button when you’re done.

Then you can go to the “Error Message” tab of the plugin.

The plugin will already have pre-written error messages for different situations by default. However, you can customize any error message in this section.

Edit error messages

Now, if someone tries to enter a restricted username and email address when signing up for your website, they’ll see an error message and have to choose another username and email address. E-mail adress.

Here’s what it looked like on our demo website when we tried to register using a restricted username and email address.

Error message when entering a restricted username

We hope this article helped you learn how to restrict usernames in WordPress. You can also check out our guides on how to start an online store and the best AI chatbot software for your website.

If you liked this article, subscribe to our Youtube channel for WordPress video tutorials. You can also find us on Twitter and Facebook.



Leave a Comment

Your email address will not be published.