WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Each time I register I end up in the wp-login page (back-end):

enter image description here

Is there any way of redirecting the users who register to a page template (front-end)?

share|improve this question
check the available plugins for code samples – kaiser Jun 10 '11 at 14:45
@kaiser what kind of plugins? – janoChen Jun 10 '11 at 15:08
Redirect Plugins - Your clients will like it. – kaiser Jun 10 '11 at 16:09
up vote 8 down vote accepted

You can use the filter registration_redirect to pass back your own URL, for example;

function wpse_19692_registration_redirect() {
    return home_url( '/my-page' );

add_filter( 'registration_redirect', 'wpse_19692_registration_redirect' );

Drop it in your functions.php or a plugin :)

share|improve this answer
Thanks for the answer but I'm still being redirected to the wp-login back-end :( (I'm working on localhost LAMP, but I don't think that's the reason). – janoChen Jun 10 '11 at 16:09
Are you sure the theme with the code is active? And which version of WP are you running? It worked fine for me (tested just now, 3.1.3). – TheDeadMedic Jun 10 '11 at 16:21
OK it worked after I deactivated bbPress I guess there is a conflict with the plugin. Thanks! – janoChen Jun 10 '11 at 16:26
@TheDeadMedic I have a similar question but i'm registering from a page with a custom template that includes a registration form. The redirect isn't working it's taking me back to the main registration page with message to check my email for the password. Can you take a look at my question please. wordpress.stackexchange.com/questions/130560/… – Anagio Jan 20 '14 at 22:11

This is what i use

<form action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">
<input type="text" name="user_login" value="Username" id="user_login" class="input" />
<input type="text" name="user_email" value="E-Mail" id="user_email" class="input"  />
<?php do_action('register_form'); ?>
<input type="submit" value="Register" id="register" />
<input type="hidden" name="redirect_to" value="/success"/>
<p class="statement">A password will be e-mailed to you.</p>
share|improve this answer

If like me, you use a plugin like ProfilePress to power/create your WordPress registration form, the following code will automatically log in and redirect registered users to a welcome page.

add_action( 'pp_after_registration', 'pp_redirect_after_registration', 10, 3 );

function pp_redirect_after_registration( $form_id, $user_data, $user_id ) {

    wp_set_auth_cookie( $user_id );
    wp_set_current_user( $user_id );

    $custom_page_url = 'http://example.com/welcome/';

    wp_redirect( $custom_page_url );

Note: I use the free plugin (https://wordpress.org/support/plugin/ppress) version and the above code work both in free and the PRO version.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.