How to redirect new WordPress user to previous page after registering

There’s a registration_redirect filter you can use:

add_filter( 'registration_redirect', 'wpse_129618_registration_redirect' );
function wpse_129618_registration_redirect( $redirect ) {
    if( isset( $_SERVER['HTTP_REFERER'] ) && 0 != strlen( $_SERVER['HTTP_REFERER'] ) ) {
        $redirect = esc_url( $_SERVER['HTTP_REFERER'] );
    }
    return $redirect;
}

Alternately, you can edit the PHP that is generating your <form> and add a hidden field named redirect_to, using the current page’s address (ie, $_SERVER['PHP_SELF']).

References