• After migrating my wordpress site users who are not Admins are redirected to the site’s homepage after login. On the old site they were redirected on wp-admin. The Administrator is redirected to wp_admin as it should.

    I want the users to be redirected to wp-admin after login.

    I changed siteurl from the database (wp_options), also added this filter in my functions.php:

    function my_login_redirect( $redirect_to, $request, $user ) {
    
        return admin_url();
    }
    
    add_filter( 'login_redirect', 'my_login_redirect', 10, 3 );

    Any help please? Thank you and Happy Easter!

  • The topic ‘All other users except admin are redirected to homepage’ is closed to new replies.