How To Restrict Usernames In WordPress

If you manage a WordPress blog where anyone can register, then you might wanna restrict usernames in WordPress. If anyone can register in your website, then they can also pick any username, such as moderator, developer, spam, comment, email, download and more.

You can do this job in two ways – with plugin or without plugin. Let’s get started

With Plugin

Restrict Usernames is the most popular plugin when it comes to restrict something in your WordPress username. This plugin allows you to restrict the usernames that new users may use when registering for your WordPress.

Without Plugin

If you don’t want to install a new plugin to your WordPress, then you can also do this job with your functions.php file. This codes comes from & it also prevents spaces in usernames which for some strange reason.

Add following snippet to your theme’s functions.php file:

You can add as many names as you want in the above code.

One Response

  1. Gabriel DiLaurentis February 23, 2017

Leave a Reply