WPForms Blog

WordPress Tutorials, Tips, and Resources to Help Grow Your Business

WordPress registration redirects

How to Set Up WordPress Registration Redirects (Complete Guide)

by Lindsay Liedke on Oct 8, 2018

Do you want to set up WordPress registration redirects on your site? Maybe you want to thank your users for registering with your site or you want them to automatically log in upon registering. Whatever your goals, it’s easy to set up redirection after registering with your WordPress site.

In this article, we’ll show you how to set up WordPress registration redirects, step by step.

Create a Custom Registration Form

Creating a custom registration form is essential for you if you run a community-powered site, like a membership site, eCommerce, forums, niche social network or any other site that require users to register an account.

Creating a custom registration form will give your site a more professional appearance by displaying a consistent brand.

The easiest way to create a custom registration form on your WordPress site is by using WPForms. With its User Registration addon, you can create a custom registration form, connect it with your newsletter, and even collect payments from people as they register.

With WPForms, you can either require a user to confirm their profile by clicking a link in their email, or you can require a manual approval process where an administrator must approve each account.

For more details, you can read about creating a registration form with WPForms.

Now let’s take a look at the different registration redirects you can set up on your site.

1. Redirect Users to the Custom Registration Page

Now that you’ve created a page with a custom registration form on your site, you might want to redirect all your users to this page when they try to access the default registration page.

Unless you set this redirection, your users can access the default WordPress registration page on your site by visiting this URL: http://example.com/wp-login?action=register.

There are a few reasons why you might want to redirect users to a custom registration page:

  • The default registration form might attract spam registration, and since WPForms does an excellent job preventing spam form submissions, creating a custom registration form is the best solution.
  • To get additional information from your users before providing them access to your WordPress dashboard, you must disable access to the default registration page.
  • Branding your custom registration page to match the look of the rest of your website is more professional and visually appealing.
  • Custom registration forms can be embedded anywhere on your website when you use WPForms, which grants you more creative flexibility.

To enable this redirection, all you need to do is to add the following code snippet to your functions.php file. This code snippet redirects your users to the custom registration page with the URL slug /registration-url when they try to access the default registration page.

If you’re not sure how to add the code, see this guide on how to paste code snippets into your functions.php file to prevent any WordPress errors.

// Redirect Registration Page
function my_registration_page_redirect()
{
	global $pagenow;

	if ( ( strtolower($pagenow) == 'wp-login.php') && ( strtolower( $_GET['action']) == 'register' ) ) {
		wp_redirect( home_url('/registration-url'));
	}
}

add_filter( 'init', 'my_registration_page_redirect' );

Code credits: 2bearstudio

2. Redirect Site Visitors to a Thank You Page after Registration

Now that you have a custom registration form created, you might want to redirect users to a thank you page after people register.

Having a thank you page enables you to thank your users for registering with your site. Aside from that, you can onboard new users and explain what to do next on their first visit.

For example, eCommerce sites can show a list of popular product categories and encourage users to shop. Similarly, forums can redirect newly registered users to a thread that explains rules and regulations of creating a new thread.

To redirect people to a thank you page after they submit their registration form on your website, all you have to do is set up a form confirmation in the WPForms Form Editor’s settings. But first, make sure you’ve created the thank you page on your website.

To start, go to Settings » Confirmation.

WPForms Confirmation Settings

WPForms has three confirmation types to choose from:

  1. Message: display a customized message after site visitors submit your site’s forms.
  2. Show Page: redirect site visitors to a page on your website after they submit your site’s forms.
  3. Go to URL: take site visitors to another website when they submit a form on your website.

For our example, we’ll choose Show Page from the dropdown menu.

confirmation thank you page

When you do this, you’ll see a list of the pages on your website you can redirect users to. Choose the thank you page you created and click Save.

For examples, check out this roundup of effective thank you pages for inspiration.

3. Auto-Login After Registration

If you don’t want to redirect users to a thank you page after registration, you can enable auto-login. By enabling auto-login, you can make your users engage with your site immediately after creating an account.

This is especially helpful if a user is in the process of filling an immediate need, like purchasing merchandise they found while browsing through your ecommerce site. Auto-login makes it convenient for site visitors to finish immediately, without having to re-login to their newly created account.

To enable auto-login on your site, you can use the Auto Login New User After Registration plugin.

After activating the plugin, go to Settings » Auto Login New User After Registration in the WordPress dashboard. This will bring you to the settings page where you can enable auto-login functionality.

enable auto-login

Select the checkbox labeled Check to enable auto-login for new user after registration. Doing this will automatically log in anyone that submits a registration form on your website and send them an email telling them how they can change their password.

You can also enter the URL of the web page to redirect users to once they register on your website.

Lastly, this free auto-login plugin lets you change the text in the welcome email from “set your password” to “change your password,” enable an admin email notification every time someone registers on your site, which isn’t necessary because WPForms automatically sends admin notifications, and even send email notifications about users that have lost/changed their passwords.

And there you have it! You now know how to set up WordPress registration redirects on your site when someone fills out your site’s registration forms.

If you enjoyed this article, you might also want to try these WordPress hacks to customize your login page.

So, what are you waiting for? Get started with the most powerful WordPress forms plugin today.

And don’t forget, if you like this article, then please follow us on Facebook and Twitter.

Comments

  1. Thanks for reading this article – I hope you found it helpful.

    I wanted to let you know about our new WordPress survey plugin that allows you to build interactive polls and surveys within minutes. You also get best-in-class reporting, so you can make data-driven decisions.

    You can get it 100% free when you purchase WPForms Pro plan.

    Get Started with WPForms Today and see why over 1 million websites choose WPForms as their preferred online form builder.

    Syed Balkhi
    CEO of WPForms

  2. Redirecting /wp-login?action=register works great when using this code but how would I go about doing the same for the /login and /wp-login.php pages?

    I tried doing it with this code but I really have no idea what I’m doing. Basically just guessing here.

    // Redirect login Page
    function my_login_page_redirect()
    {
    global $pagenow;

    if ( ( strtolower($pagenow) == ‘wp-login.php’) && ( strtolower( $_GET[‘action’]) == ‘login’ ) ) {
    wp_redirect( home_url(‘/my-account’));
    }
    }

    add_filter( ‘init’, ‘my_login_page_redirect’ );

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.