function prefix_redirect_login_page() { // Check if the current page is the login page if( $_SERVER['REQUEST_URI'] == '/wp-login.php' ) { // Redirect to the home page wp_redirect( home_url() ); exit; } } add_action( 'init', 'prefix_redirect_login_page' );
Redirect from wp-login.php to home_url
In