How to Create a User Registration Form in WordPress

You want people to be able to sign up on your site: members, students, volunteers, the folks who keep asking you for a login. So you go looking for a user registration form in WordPress and find what comes in the box (a grey panel with the WordPress logo, a username field, an email field, and nothing else). You can’t add a question, you can’t change how it looks, you can’t choose what a new member is allowed to do, and it lives on a page that looks nothing like the rest of your site.

Maybe you’ve already tried to fix it, with a plugin that promised a pretty registration page and delivered a settings screen the size of a phone book, or a forum snippet you’re afraid to touch. Or you flipped on “Anyone can register,” watched the spam accounts roll in, and flipped it right back off. We’ve been there, and registration is one of those things that should be simple and somehow never is.

It’s fixable, and faster than you’d think. In this guide you’ll build a registration form that sits on your own page, asks what you want to ask, drops new members into the right role, and signs them in as soon as they hit the button. No code, no settings safari, about ten minutes.

Illustration showing how to build a user registration form in WordPress using the Ninja Forms User Management add-on

What you’ll need

Why not just use the WordPress registration page?

You can, and for a bare-bones site it does the job. But the built-in page gives you a username field, an email field, and nothing else.

No styling, no extra questions, no say in what role a new account gets, and your visitor ends up on a screen wearing the WordPress logo instead of yours. If your site is a community, a class, or an organization sharing resources with members, that’s a rough first impression.

One thing to clear up before you start, because it trips people up: you do not need to turn on “Anyone can register” under Settings > General. The form you’re about to build creates accounts on its own, with that setting left off. The default WordPress registration page stays closed to the public while your form does the work.

Start your user registration form in WordPress from a template

Don’t start from a blank form. The User Management add-on ships with a Register User template that arrives with every field and every action already created and already wired together.

Your job shrinks to three things: pick a role, decide whether to log new members in, and put the form on a page. Building the same form from scratch means adding seven fields by hand and mapping each one yourself, and the mapping is where people go wrong.

  1. In your WordPress admin, go to Ninja Forms > Add New. The template gallery opens.
  2. Find the Register User template and click it. The builder opens with the form already built (we named ours Community Member Registration).
Ninja Forms Add New template gallery with the Register User template tile marked among the other form templates.

Here’s what you get, top to bottom:

  • Username, Email, Password, and Password Confirm. A WordPress account needs a username, an email address, and a password, so keep these four fields.
  • First Name, Last Name, and Website. Yours to delete if you don’t need them, and you can add fields of your own.
  • Five actions waiting on the Emails & Actions tab: Save Submission, User Notification, Success Message, Admin Email, and Register User.

Two of those actions are emails, and both come pre-written: Admin Email tells you a new user has registered, and User Notification thanks the new member. Change the wording if you like. There’s nothing to build.

Pick the role new members get

Coming from the template, the Register User action is already filled in. The Username field feeds the login name, Email feeds the account email, and so on down the list. The one to stop and look at is Role, because it decides what every new account is allowed to do on your site.

  1. Click the Emails & Actions tab at the top of the builder.
  2. Click the Register User action to open its settings.
  3. Check the mapping at the top: Username, Email, First Name, Last Name, URL (which points at the Website field), and Password should each show the matching form field.
  4. Set Role. For a community or membership signup, choose Subscriber.
The Register User action settings in the Ninja Forms builder, with Username, Email, First Name, Last Name, URL, and Password each mapped to a form field and Role set to Subscriber.

Subscriber means a member can log in and manage their own profile, and that’s all. Resist the urge to hand out anything higher on a public form. You can always promote one person later from Users in your WordPress admin, and if you’re not sure what each role can do, WordPress keeps a plain-English list of roles.

Log them in on the spot, or email them a password?

Still inside the Register User action, expand its Advanced settings below the mapping. Three toggles matter here, and the defaults are good ones.

  • Login user upon successful registration is on. Your new member is signed in as soon as they submit, with no hunting for a login page afterwards. Leave it on.
  • Refresh the page upon registration only appears while that login toggle is on. Its own help text warns that it will not show your form’s success message, so turn it on only if you’d rather have a page reload than a thank-you.
  • Email credentials to newly created users? is off. Switch it on and the form generates a random password and emails it, so delete the Password fields if you go this way. It suits an internal or admin-vetted signup, but for everyone else it adds an email round trip before they can get in, so we’d leave it off.

Below those you’ll see Custom Meta, which you can skip for now. It comes into play when you add an Update Profile form later and want it pre-filled with what members entered at signup. The User Management docs walk through it, and the one rule is that the meta key has to be spelled the same on both forms.

One more thing while you’re thinking about roles: for most community sites, registering members is half the job, and the other half is hiding certain pages from everyone else. That’s a separate setup, and we cover it in our guide to restricting user access to content in WordPress. Finish this form first.

Put the form on a page of its own

Click PUBLISH in the builder header. Then pick how you want the form to appear on your site:

  • Shortcode. Head to Ninja Forms > Dashboard. Every form’s shortcode sits in the SHORTCODE column next to its title. Copy it and paste it into any page or post.
  • Block. In the block editor, add the Ninja Forms block and pick your form from its dropdown.
  • Public link. If you’d rather not build a page at all, Ninja Forms can give you a hosted link for the form that you can share anywhere.

Wherever you put it, give the form a page of its own rather than a sidebar or footer. As you’ll see in a second, anyone who is already logged in doesn’t see this form at all, so a signup form in the footer of every page is invisible to every member you already have.

Give Ninja Forms a try today!

Ninja Forms is free! Optional premium features available with any membership.

Test it logged out, not with Preview Form

The only real test of a user registration form in WordPress is the published page, in a private browsing window or after you log out. Preview Form does not create an account. It shows the form, takes your submission, shows the green success message, and saves a submission entry, but no user is created.

It looks like it worked. It didn’t. Skip preview for this one form.

And if you open the published page while you’re still logged in, the form doesn’t show up either. In its place you’ll see one line: “Please logout to view this form.” That’s the add-on doing its job, and every visitor who already has an account sees the same line.

If you landed here from a search for that sentence, nothing is broken. Log out and it’s there.

  1. Open the page in a private window, or log out of your site first.
  2. Fill in the form with a test username and an email address you can check, then submit.
  3. Look for the success message.
  4. Back in your WordPress admin, open Users and confirm the new account is there with the role you chose.
  5. If you left auto-login on, reload the form page in that same private window. The form is gone, and the “Please logout to view this form.” line is in its place.
The Community Member Registration form as a logged-out visitor sees it, with Username, First Name, Last Name, Email, Website, Password, and Password Confirm fields above a Register button.

That last step is your proof: the registration worked and the login stuck. That’s all there is to it. Delete the test account when you’re done, or keep it as a member you can sign in as whenever you want to see what members see.

What a visitor sees when something’s already taken

You don’t have to build any of this. The form checks before it creates anything and puts the message right on the field:

  • An email that already has an account: “This email address is already in use, please use a different email.”
  • A username that’s taken: “This username is taken, please use another.”
  • A required field left empty: “This is a required field.” on the field, plus “Please correct errors before submitting this form.” at the bottom.

Two things that can look like the form failing

If a visitor who is definitely logged out still sees “Please logout to view this form,” your caching plugin is most likely handing them a copy of the page saved while someone was logged in. Exclude the registration page from caching in your caching plugin’s settings, clear the cache, and try again in a fresh private window.

If the two emails don’t arrive, that’s your site’s mail delivery, not the form. Our WordPress email guide walks you through finding and fixing it.

Start signing up members on your own page, on your own terms

Back at the top you had a grey WordPress box you couldn’t change and a setting you were afraid to turn on. Now you have a user registration form in WordPress that lives on your page, asks your questions, files new members under the right role, and signs them in as they arrive. You didn’t touch a line of code, and you never had to open the default registration page to the public.

Our opinion, for what it’s worth: the template is the right starting point every time, so start there, change what you need, and spend the time you saved on the members themselves. Ready to build yours? Pick up the User Management add-on and you’ll have the form live before your coffee cools.

Try Ninja Forms Today

Always free, with premium features available through our memberships.

2 Comments

  1. These forms are great to work with, but I have done everything in the documentation (e.g. under Custom Meta, I set a Meta Key and matched it to the Field Key) and I cannot get any custom data from the forms to show on the user’s profile page. (Even if viewed as an admin.) I’m out of ideas and need help. The data does show up perfectly on the submissions page.

  2. Hi Kathryn

    Please reach out to us via our contact form for support. We’ll be happy to help.

    Don’t forget to include a System Status report and an exported copy of the form having issues.

    Thanks!

    Mia

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.