/wp-includes/functions.wp-scripts.php
function soi_login_redirect( $redirect_to, $request, $user ) {
return ( is_array( $user->roles ) && in_array( 'administrator', $user->roles ) ) ? admin_url() : site_url();
}
add_filter( 'login_redirect', 'soi_login_redirect', 10, 3 );