Redirecting user after updating profile?

This is the function that you need:

add_action( 'profile_update', 'custom_profile_redirect', 12 );
function custom_profile_redirect() {
    if(is_admin()):
        wp_redirect( trailingslashit( home_url() ) );
        exit;
    endif;
}

Just change the target of wp_redirect to whatever URL you want your users to go to. You can even add conditional logic to it if you only want this to happen for certain users, like the function below:

add_action( 'profile_update', 'custom_profile_redirect', 12 );
function custom_profile_redirect() {
    if ( is_admin() && current_user_can( 'subscriber' ) ) {
        wp_redirect( trailingslashit( home_url() ) );
        exit;
    }
}

Hope this helps! You can learn more about it from this tutorial I wrote.

Leave a Comment