Go to the Public Html folder:-
Step 1:- In the root folder wp-login.php Download the file then open it in any editor.
Step 2:- Find all wp-login and replace them with your custom URL name ( in my case its wp-news)
Step 3:- Upload your new login file ( wp-news.php)
Go to functions.php and paste the below code. (In my case I have to change the wp-login.php to wp-news.php)
add_filter( 'login_url', 'custom_login_url', PHP_INT_MAX );
function custom_login_url( $login_url ) {
$login_url = site_url( 'wp-news.php', 'login' );
return $login_url;
}
add_filter( 'logout_url', 'custom_logout_url', PHP_INT_MAX );
function custom_logout_url( $logout_url ) {
$logout_url = site_url( 'wp-news.php', 'logout' );
return $logout_url;
}

No comments:
Post a Comment