WordPress registration redirects

How to Set Up a Registration Redirect in WordPress (Complete Guide)

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 super important 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.

WPForms is the best WordPress Form Builder plugin. Get it for free!

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 WordPress users to a custom registration page:

  • The default registration form might attract spam WordPress 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 WordPress 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. And it’s easy to do with a registration redirect in WordPress.

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 WordPress 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.

In Conclusion

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.

Using WordPress and want to get WPForms for free?

Enter the URL to your WordPress website to install.


  1. 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’ );

  2. Hi,
    Is it possible to redirect the user to a specific location based on the button he just clicked to register/login?
    That mean that each different button would be linked to a different register/login form, each redirecting to a specific address.
    Would that be possible?
    Thanks in advance

    1. Hi Sowx,

      I’m afraid I’m not 100% sure of your question but yes, you can link buttons on your website to different forms and then once those forms are submitted, have them redirect the user to a different URL. If you need any more information on redirecting a user upon submitting a form, please check out our guide!

      I hope this helps!

  3. Hi, the auto login and redirection works great but for some reason im not receiving the notification emails. ( users are not available in the entries section as well )
    and when i disable the auto login, it works again.

      1. Hi, thanks for the reply, the email notifications are working fine now, but the other problem still remains, the form is still not storing the entries for users, i’ve tested it many times, the auto login and redirection is working great, and the email notifications as well, but for some reason its not storing users entries in the form, kindly suggest what to do Thanks.

  4. Hey! I’m getting an error when I try to add this copied code to the “snippits” plugin detailed in the “how to paste code snippets into your functions.php file”.


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

    if ( ( strtolower($pagenow) == ‘wp-login.php’) && ( strtolower( $_GET[‘action’]) == ‘register’ ) ) {
    wp_redirect( home_url(‘https://date.intro-social.com/new-user/’));

    add_filter( ‘init’, ‘my_registration_page_redirect’ );

    Error Message:

    Don’t Panic
    The code snippet you are trying to save produced a fatal error on line 6:

    syntax error, unexpected ‘;’
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.

    Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.

    1. I found a workaround. By using a global redirect manager, I was able to redirect the login from wordpress to my wpform.

      1. Hey Tyler – Thanks for letting us know! Glad to know you were able to sort it out, please feel welcome to reach out to us for any other questions!

    2. Hey Tyler, We had a small glitch on the site for a short span of time, that inserted some special characters in the code. I assume you tested the code during that time.

      Code formatting is fixed now, could you please try that code again and it should work fine.

      Apologies for the inconvenience!

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.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.