Answers to common UsersWP questions about registration and login. Click a question to open the answer.
That message comes from the GeoDirectory Add Listing form. Edit the page set as your Add Listing page and add show_login="1" to the shortcode, for example [<span></span>gd_add_listing show_login="1"]. Login and Register buttons then appear under the message.
You can change the message text too: [<span></span>gd_add_listing show_login="1" login_msg="Please log in to add your listing."]. If you use the GD > Add Listing block, the same options are in its settings.
A few things to know:
- With UsersWP active, the links go to your UsersWP login and register pages, and they open in the lightbox if the UsersWP lightbox is enabled.
- The Register button only shows when “Anyone can register” is ticked in Settings > General.
- If you’d rather let visitors post without an account, GeoDirectory has an “Allow posting without logging in?” option in GeoDirectory > Settings > General (advanced settings).
UsersWP’s Country field starts as a plain text box, and a small script (countrySelect) turns it into a country picker with flags. If the field shows up empty, that script did not run on the page. Open your browser console on the register page: an error like countrySelect is not a function confirms it.
The usual cause is a caching or optimization plugin that combines, defers or delays JavaScript. Exclude wp-content/plugins/userswp/assets/js/countrySelect.min.js from those options, clear the cache and test again in a private window.
If the field is not there at all, check that it is part of the register form. In UsersWP > Form Builder > Account, open the Country field, turn on Include this field in register form and save, then make sure it is listed on the Register tab. See also Why Can’t I See Fields in Form Builder > Register?
UsersWP has no layout setting for this, but you can give fields a CSS class and style them. In UsersWP > Form Builder, open each of the two fields and enter uwp-half in CSS class, then save. CSS class is an advanced setting, so click Show Advanced if you can’t see it. Make sure the two fields sit next to each other in the form.
Then add this CSS in Appearance > Customize > Additional CSS, or wherever your theme takes custom CSS:
.uwp-half { display: inline-block; width: 49%; vertical-align: top; }
On small screens you may want them stacked again, which you can do by wrapping that rule in @media (min-width: 576px) { }.
Use the form builder. Go to UsersWP > Form Builder and open the Register tab to choose which fields appear and in what order. A new install has first name, last name, username, email and password.
To drop a field, remove it from the Register tab. Email is the only field you cannot remove. Without a username field UsersWP creates the username for the user, and without a password field it generates a password and emails it to them.
To add a field, create it in the Account tab with Include this field in register form switched on, then add it in the Register tab.
The settings for each form, such as the user role, registration action and redirect, are in UsersWP > User Types, where you can also create separate forms for different user types. Log in with Facebook and other networks comes from the Social Login add-on; see the Facebook Setup Guide.
Yes. The register form shows the WordPress password strength meter as the user types. To require a strong password:
- Go to UsersWP > Settings > General > Register.
- Set Minimum password strength to Medium or Strong.
- Optionally change the error message under the advanced settings.
The create account button stays disabled until the password reaches that strength. The same advanced settings let you set a minimum and maximum password length.
A field only shows on a form when it is switched on in the form builder. Go to UsersWP > Form Builder, open the Account tab and click the field to check its settings:
- Is active must be on, or the field is not shown anywhere.
- Include this field in register form must be on for the register form, and the field must also be added in the Register tab.
- Fields set to For admin use only? are hidden from users.
If fields disappeared after moving the site, check these first, because a database copy can leave them switched off. UsersWP keeps its fields in its own tables (uwp_form_fields and uwp_form_extras with your table prefix), so make sure your migration copied them with data.
See also Why Can’t I See Fields in Form Builder > Register? and Working with the Form Builder.
Duplicate or missing default fields usually mean the plugin’s install or upgrade step didn’t finish, for example because the server ran out of time or memory during an update. Try this before reinstalling anything:
- Back up your database.
- Update UsersWP to the latest version.
- Go to UsersWP > Tools and run Clear version numbers. This makes the install and upgrade routines run again.
- Open UsersWP > Form Builder, select the form for each user type, remove any duplicate fields and save.
- Clear your site cache and test the register page while logged out.
Don’t uninstall with “erase data” enabled under UsersWP > Uninstall, as that deletes UsersWP’s user data and pages.
If a field is missing from the profile’s More Info tab, edit the field in the Form Builder and add “More info tab” to “Show in what locations?”. The More Info tab itself is added in UsersWP > Form Builder > Profile Tabs. See also Why can’t I see fields in Form Builder > Register?.
When a logged-out visitor opens the add listing page, GeoDirectory shows “You must login to post.” with Login and Register buttons under it. With UsersWP active and its login and register pages set in UsersWP > Settings > General > Pages, those buttons go to the UsersWP pages. After logging in, the user is sent back to the add listing page.
If you only see the message and no buttons, check:
- The add listing shortcode or block has “Show the login and register links” turned on. In a shortcode that is
[<span></span>gd_add_listing show_login="1"], which is the default. - The Register button only appears when Settings > General > Membership > Anyone can register is ticked.
UsersWP already keeps logged-in users off those pages. If a logged-in user opens the login, register, forgot password or reset password page, they are sent to the account page instead, or to the redirect_to address if the link has one. Developers can change where they go with the uwp_logged_in_redirect filter.
To hide the menu links as well, add them from the UsersWP Endpoints box in Appearance > Menus. Links from its Logged-Out tab (Register, Login, Forgot Password) are hidden from logged-in users, and links from the Logged-In tab, such as Account and Logout, are hidden from visitors. If you can’t see the box, open Screen Options at the top of the Menus screen and tick UsersWP Endpoints. There is more on this in Add Menu Items.
The login form has a Form title setting. In the UWP > Login block or widget it’s under the advanced settings. With the shortcode, use form_title:
[<span></span>uwp_login form_title="0"]removes the title.[<span></span>uwp_login form_title="Sign in"]changes it.
Edit the page set as your login page in UsersWP > General > Pages to change the shortcode there. The register form has the same option, for example [<span></span>uwp_register form_title="0"]. Developers can also change titles with the uwp_template_form_title filter. All login options are listed in UWP > Login.
Password reset and account activation links carry a one time key that WordPress stores for the user. “Invalid key” means the key in the link doesn’t match the one stored. Check these causes:
- The link was already used, or the user asked for another reset since. Only the newest link works.
- The link has expired. WordPress keeps reset keys valid for one day by default.
- A persistent object cache (Memcached or Redis) is returning old user data. UsersWP clears the user’s cache before it checks the key, so flush the object cache and test again with it turned off. If that fixes it, ask your host to check the object cache setup.
- A page cache is serving a stored copy of the reset page. Exclude the login, register, forgot password, reset password and account pages from page caching.
For more on caching and login pages, see Login cache issue, site showing logged out after login.
UsersWP shows the error that WordPress returns when a login fails, so start with the exact message on the login form.
- “Your account is not activated yet” means the user type uses the Require Email Activation registration action. The user has to click the link in their activation email, and the message has a Resend link. Check the setting in UsersWP > User Types.
- A message about an administrator needing to activate the account usually comes from another plugin. Some security plugins have a manual approval option for new registrations. Approve the user there or turn that option off.
- If you use our Moderate User Registration add-on, new users can’t log in until you approve them.
If users see a blank page after registering, a PHP error is the usual cause. Turn on WP_DEBUG_LOG and check wp-content/debug.log. More checks are in Why can my users not register?.
The UsersWP login form fills the width of whatever it’s placed in. On a full width page it stretches across the screen, so put the shortcode or block inside a narrower column or group.
If clicking Login opens the login page instead of the lightbox, check these:
- Default Design Style is set to Bootstrap in UsersWP > General > Developer.
- Login Lightbox is ticked in UsersWP > General > Login, and Register Lightbox in UsersWP > General > Register.
- Your menu links were added from the UsersWP Endpoints box in Appearance > Menus. A custom link with the same URL doesn’t open the lightbox. Remove it and add the endpoint item instead.
Other links can open the lightbox if you give them the class uwp-login-link or uwp-register-link. After a login in the lightbox, the current page reloads. See Add menu items for the menu setup.
Yes, UsersWP has its own login and register lightbox, so you don’t need a popup plugin. It’s on by default: check Login Lightbox in UsersWP > General > Login and Register Lightbox in UsersWP > General > Register. The Default Design Style in UsersWP > General > Developer must be Bootstrap.
The lightbox opens from:
- UsersWP menu items added from the UsersWP Endpoints box in Appearance > Menus
- The login and register links that GeoDirectory shows, for example on the add listing page
- Any link with the class
uwp-login-linkoruwp-register-link, or the attributedata-uwp-link="login"ordata-uwp-link="register"
For example: <a href="/login/" class="uwp-login-link">Log in</a>. After logging in through the lightbox, the current page reloads.
If you still prefer a popup plugin, place the [<span></span>uwp_login] or [<span></span>uwp_register] shortcode inside the popup. The GeoDirectory favourite button sends logged out visitors to the login page and brings them back to the listing after they log in.
Go to UsersWP > General > Login and change Login Redirect Page. Besides your pages, it has three options: Last User Page (the default, which sends users back to the page they were on), Default Redirect and Custom Redirect.
Default Redirect sends users to your home page, unless another plugin changes it through the WordPress login_redirect filter. It does not open wp-admin the way the wp-login.php form does. To send users to the dashboard, choose Custom Redirect and enter your /wp-admin/ address in Redirect Custom URL.
You can send each user role somewhere different in UsersWP > Redirects. Role based redirects do not apply while Login Redirect Page is set to Last User Page. Developers can override the result with the uwp_login_redirect filter.
The Login Redirect Page setting in UsersWP > General > Login decides where people land after logging in. With “Last User Page” selected, UsersWP sends them back to the page they came from. If the browser didn’t pass on a previous page, for example because the visitor opened the login page directly, they go to your homepage instead.
A few other things change where people end up:
- A
redirect_toparameter in the login link always wins, for example/login/?redirect_to=https://example.com/pricing/. Use this on buttons that should bring people back to a particular page. - The login lightbox reloads the current page after a successful login. Tick “Enable Login Lightbox Redirect” in the same settings tab if you want the lightbox to follow your redirect setting.
- Role based redirects in UsersWP > Redirects don’t apply while “Last User Page” is selected.
- A logged in user who opens the login page is sent to the account page.
Redirects after registration are set per form: go to UsersWP > User Types, edit the form and pick its Redirect Page. The Redirects settings overview explains the role based options.
Don’t link straight to wp-login.php?action=logout. Without the security nonce WordPress shows a “Do you really want to log out?” screen instead of logging the user out. Use one of these instead:
- In Appearance > Menus, open the UsersWP Endpoints box and add the Log out item to your menu. See Add menu items.
- The account page already has a Logout tab.
- In theme code, build the link with the WordPress function
wp_logout_url().
To choose where users land after logging out, set the Logout Redirect Page in UsersWP > Settings > General > Login, or per role in UsersWP > Settings > Redirects.
UsersWP only uses the registration redirect when the registration action is Auto Approve + Auto Login. With the other actions the new user is not logged in yet, so they stay on the register page and see a message: Require Email Activation tells them to check their email for the activation link, and Auto Approve asks them to log in.
- Go to UsersWP > User Types and edit your registration form.
- Set Registration Action to Auto Approve + Auto Login. The Redirect Page option appears once you pick it.
- Choose a page, Last User Page (the page they came from) or Custom Redirect with your own URL, then save.
A redirect_to parameter in the register page URL takes priority over this setting. If you need email activation, there is no redirect after signing up. Once the user activates and logs in, the Login Redirect Page in UsersWP > General > Login decides where they go.
Set Login Redirect Page in UsersWP > General > Login to Last User Page. This is the default, and it sends the user back to the page they came from.
UsersWP also replaces the WordPress login URL with your UsersWP login page and keeps the redirect_to address that WordPress adds. A “Log in to reply” link on a blog post therefore brings the user back to that post after they log in. Turn on Redirect wp-login.php? on the same screen if you also want anyone who opens wp-login.php directly to land on the UsersWP login page.
With Login Lightbox switched on, logging in from the lightbox reloads the current page, so the user stays where they were. Turn on Enable Login Lightbox Redirect if you want the lightbox to follow the redirect setting instead.
With Login Redirect Page set to Last User Page in UsersWP > General > Login, UsersWP sends people back to the page they were on before the login page. It gets that page from the browser’s referrer when the login form loads. If they end up somewhere else, check these:
- If someone opens the login page directly (a bookmark, a typed address or a link in an email), there is no previous page, so they go to the home page.
- A
redirect_tovalue in the login link, or set on the login block or shortcode, always takes priority. - The previous page is saved in a hidden field on the login form, so a cached copy of the login page can send everyone to the same old page. Exclude the login page from page caching.
- Some browsers, privacy extensions and security plugins strip the referrer, and then UsersWP has nothing to go back to.
- Role based redirects in UsersWP > Redirects do not work while Last User Page is selected.
A plugin or code snippet that uses the uwp_login_redirect filter can also override the destination, so test with other plugins disabled if none of the above applies. More on the options: Settings Overview for UsersWP > Redirects.
Use User Types. Each user type is a separate registration form with its own role and redirect.
- Go to UsersWP > User Types and add a user type for each role, for example one for subscribers and one for authors.
- For each one, set “User Role to Assign”, the Registration Action and the Redirect Page users go to after signing up.
- Add the fields each form needs in UsersWP > Form Builder.
- Put the form on its own page with the form ID, for example
[<span></span>uwp_register id="2"]on /register-author/. The UWP > Register block has the same Form option.
To let people pick their type on one page instead, select several forms under UsersWP > General > Register > Register Form(s) and choose button groups or a dropdown as the selector style.
The administrator role isn’t offered, but be careful with roles like Editor: anyone who can reach the form gets that role. Redirects after login can be set per role in UsersWP > Redirects.
The UsersWP login form shows a “Create account” link and a “Forgot password?” link below the Login button. They point to the register and forgot password pages chosen in UsersWP > General > Pages, so make sure both pages are set there. You can change the link text in UsersWP > General > Login under the advanced settings (Register Link Title and Forgot Password Link Title).
If the links are missing from the default WordPress login screen (wp-login.php) or another plugin’s form, check these:
- WordPress only shows its Register link when “Anyone can register” is ticked in Settings > General.
- Another login plugin may replace the WordPress login screen with its own form. That plugin’s settings decide which links appear.
- UsersWP doesn’t change other plugins’ forms. If “erase data” was enabled under UsersWP > Uninstall when you deleted it, UsersWP also removed its own pages (login, register, account and so on), so any menu links to those pages stop working.
Yes. Username and password are optional on the UsersWP register form. Email is the only field you cannot remove.
- Go to UsersWP > Form Builder and open the Register tab.
- Remove the Username and Password fields from the register form.
Without a username field, UsersWP builds the username from the first and last name when the form has them, falling back to the start of the email address if that name is taken. If the form has no name fields, the email address itself becomes the username. Without a password field, UsersWP generates a password and includes it in the registration email.
The UsersWP login form accepts either a username or an email address, so users can log in with their email. To allow email only, see How to Force Users to Login Using Their Email Address?.
If the new user shows up in Users but the form keeps spinning, the account was saved and something after that step is hanging, such as logging the user in, sending the emails or the redirect. A caching or optimisation plugin, or an email plugin that can’t reach its mail server, is the usual cause.
- Test with your caching plugin turned off. If registration works, exclude the UsersWP pages (register, login, account, forgot password, reset password and change password) from page caching and from JavaScript minification or deferral.
- Send a test email from your SMTP plugin. If it can’t connect, every registration waits for the email to time out.
- A Cloudflare 524 error means your server took too long to answer. Ask your host to check the PHP error log for that time.
- If it still hangs, deactivate other plugins one at a time to find the conflict.
See also Why can my users not register? and Login cache issue.
When the registration action is Require Email Activation, UsersWP shows users a Resend link that sends a fresh activation email. It appears in the message shown right after they register, and in the “Your account is not activated yet” error they get if they try to log in or reset their password before activating.
You can also do it as an admin. In Users > All Users, hover over a user who has not confirmed their email and click Resend Activation, or Activate User to activate the account yourself. Both are in the Bulk actions menu as well (Resend Activation and Activate Users), so you can handle several users at once.
If no activation emails arrive at all, the problem is usually mail delivery from your server. An SMTP plugin is the common fix.
Combine a few measures, because bots and people signing up by hand need different fixes.
- Add the UsersWP reCAPTCHA add-on to the register form to stop most bots. See the ReCaptcha setup guide.
- Set the Registration Action to Require Email Activation for each form in UsersWP > User Types. Accounts with fake email addresses never get activated, and you can delete them later. With Auto Approve + Auto Login, anyone can finish signing up with an address they don’t own.
- Approve every new user by hand with the Moderate User Registration add-on.
- Set a minimum username length in UsersWP > General > Register.
For comments, tick “Users must be registered and logged in to comment” in Settings > Discussion, or use the GD reCAPTCHA add-on if you run GeoDirectory. You can use both reCAPTCHA add-ons on one site as long as they don’t protect the same form.
With email activation, users log in after clicking the link. Set the Login Redirect Page in UsersWP > General > Login if you want them to land on a page such as Add Listing.
Go to Appearance > Menus and use the UsersWP Endpoints box. It lists your Account, Change Password and Profile pages and a Log out link for logged-in users, plus Register, Login and Forgot Password pages for logged-out visitors. UsersWP hides each item from the visitors it does not apply to, so you can put them all in your header menu.
For a dropdown, add the Account item, drag Profile, Change Password and Log out under it as sub items, and change its Navigation Label to something like “My Account”. There are more details in Add Menu Items.
For a greeting with the user’s name, add the UWP > Login block or widget to a header area, or use the shortcode [<span></span>uwp_login logged_in_show="simple"]. Logged-in users then see “Logged in as” with their avatar and name and a Logout button. Without that option it shows a small dashboard of account links instead.
Logging in at /wp-login.php should take an administrator to the dashboard. If you land on the home page, something is changing the login redirect. The usual causes are:
- Another plugin. bbPress, for example, sends users to the front end after login. Deactivate UsersWP and its add-ons to see whether it still happens.
- Your UsersWP redirect settings. Logins through UsersWP forms follow the Login Redirect Page in UsersWP > Settings > General > Login, or the per-role setting in UsersWP > Settings > Redirects.
- Restrict wp-admin in UsersWP > Settings > General > Login. Roles listed there cannot open the dashboard.
To go straight to the dashboard, open /wp-admin/ while logged out. WordPress asks you to log in and then returns you there.