Have you hit a road block when it comes to WordPress user registration?
You probably would like to have new users register before being able to take certain actions (for example, posting reviews or commenting) but do not want them to have access to the WordPress Dashboard? Truth is, WordPress User Registration doesn’t have to be hard to get.
Wouldn’t it be nice to have a straight forward guide to the WordPress User Registration that will take you through:
- the default WordPress user registration
- recommended plugins to make it work the way you want
- code and tutorial suggestions for the more advanced readers
So if you found the user registration in WordPress confusing, hopefully the WordPress User Registration Series will shed some light on the hole subject and gets you closer to finalizing your project.
- Part 1 – Default WordPress User Registration
- Part 2 – WordPress User Registration Plugin
- Part 3 – Ultimate Developers Guide for WordPress User Registration – code snippets and short tutorials (coming soon)
The Default WordPress User Registration
We’ll start with some basic knowledge about WordPress users and the entire registration process. If you’re already accustomed with this, you can come back next week for the plugin and code snippets parts!
There are many reasons you might want to allow other users to register on your site. Membership sites have been around for ages, managing a bigger number of contributors or perhaps creating a stand alone web-app where logged in users get access to features or content.
This section will take you through the steps of adding users to your WordPress installation, open registrations so anyone can create an account, takes the mystery out of the different user roles and capabilities and explains the steps a user needs to take in order to register for your site.
Understanding User Roles and Capabilities
Before you start adding users or opening registrations to your site, you need to have a basic understanding of the User Roles and Capabilities.
Combined they define a set of tasks a user is allowed to perform (for example editing a post or installing plugins).
WordPress has six pre-defined Roles: Super Admin, Administrator, Editor, Author, Contributor and Subscriber. Each Role is allowed to perform a set of tasks called Capabilities. They vary from the Super Admin or the Administrator Role, that can do pretty much everything to the Subscriber, who can only update his own profile.
A few things you can do by default with Roles and Capabilities:
- The default role for new users can be set from the Settings General SubPanel.
- You can filter your users in the user listing page Users > All User SubPanel based on their user role.
- You can add or remove capabilities from user roles or even create new user roles (ex: client, member) using Plugins or Through Code.
For more information about Roles & Capabilities it’s always a good thing to checkout the Codex Page.
Allowing New User Registration
When opening up your site to the WordPress User Registration, it’s recommended you leave the default User Role setup in Settings -> General SubPanel to subscriber, since you don’t know who will register on your site – and you don’t want to arbitrarily give higher levels of access to various parts of your website unless you actually know that particular user.
The good part is that as an admin you can always change the role on a user by clicking edit on that particular account in the Users -> All Users SubPanel.
To activate the WordPress User Registration you need to enable Anyone Can Register in the Settings -> General SubPanel. If you don’t have it enabled users get a notification letting them know “User Registration is currently not allowed”.
Also, in case you were wondering, the direct URL for registration on a WordPress site is http://yourdomain.com/wp-login.php?action=register. After a user enters the username and email address he’ll receive an email with his email and password (WordPress multisite users will get an activation link they need to click on and then another email with their credentials will be sent).
After a user has registered, as a site Administrator, you can edit the users’s account and assign a different role if needed.
Manually Adding New WordPress Users
Allowing users to create accounts on your WordPress site isn’t the only way to do it. As an Administrator, you can also manually create new users with a username, email and a few other fields.
To do so you need to be logged in and then go to Users -> Add New SubPanel.
- The required fields are Username, Email and Password (without them you can’t create a new user)
- If you click on the Show Password button, WordPress will automatically generate a unique strong password that you can use. This password can be hidden if you click on the Hide button. Also you can change it into a weaker password but you will need to check “Confirm use of weak password” option.
- You can chose to send the credentials to the email address of the new user
- And you can select what role your new user will have. You can change the default role in Settings -> General SubPanel.
Editing Your Profile
Found in the Users -> Your Profile SubPanel, this give you the possibility to change things like your Nickname or how you’re displayed publicly. Similar to the Add New User section, this is pretty straight forward with a few things that are worth mentioning:
- The Display name publicly as is used by most themes as the default name under your posts and it can be a combination of username, first and last name and nickname
- You can disable the WordPress Tool bar on the front-end of the site by deselecting the Show Toolbar when viewing site option. Please note this only affects you and by default it will still appear for other users on the front-end.
- The Biographical Info is sometimes used by certain themes (like Twenty Eleven for example) to display an author widget right underneath the content of your blog post. Nice way to let people know who is the writer of the article they just read.
If you find these default setting limited and would want to add extra fields to your profile pages, the good part is that WordPress is so flexible that such a task is possible directly with certain plugins or you can even code this type of functionality your self if you’re up to it.
As an administrator, besides your own profile, you can also edit the profile of any user on your website. It can be useful for example to update the Bio for one of your authors or reset a password if they had problems with the default password reset.
To manage your users you need to go to Users -> All Users SubPanel.
- The User Listing is sortable by Username, Name and Email.
- You can filter based on their Roles.
- As an Administrator you can edit and delete any user (including administrators), but you can not delete your own account
- You can change a users role directly from this screen. Useful when you want to change multiple users roles all at once.
The Default Meta Widget
To make it easier to access your dashboard, WordPress comes by default with a simple, yet useful Widget called Meta. You can find it in Appearance -> Widgets SubPanel. After you drag it to your sidebar, you’ll get access to Log in/out, admin, feed and WordPress links.
This way you can log in, log out and even register without having to write the exact WordPress url in the browser like http://yourdomain.com/wp-login.php
Generally speaking, the Default WordPres User Registration hasn’t changed much in past few years. It’s still pretty much the same. The good thing is that people are used with it and provides new users to a workflow that is clear and easy to understand. The bad thing is that it’s not as useful when it comes to building something that is more then a blog, and this is a growing trend that it’s not going to stop soon.
However unchanged the User Interface is, in code behind the User Registration is really, really good. It’s flexible, extendable and fairly straight forward to customize.
There are a ton of plugins (we’ll talk about them in Part 2) as well as a ton of tutorials and code snippets that can take your project one step closer to completion (keep an eye out for Part 3 of this series).