1

how to change the default login page of wordpress from wp-login.php to custom login page. So that any request for login by any user should redirect to custom login page instead of wp-login.php.

user3187719
  • 267
  • 1
  • 3
  • 12

1 Answers1

2

here's an answer from another answer, put in functions.php:

add_action('init','possibly_redirect');

function possibly_redirect(){
 global $pagenow;
 if( 'wp-login.php' == $pagenow ) {
  wp_redirect('http://google.com/');
  exit();
 }
}

Into "http://google.com/" enter the URL of the custom page.

Community
  • 1
  • 1
tempranova
  • 929
  • 9
  • 13
  • thanks for your help. I have one thing to ask you. I have renamed wp-login.php with name wp-login.php plugin. So shall I use that renamed name in that code or wp-login? – user3187719 Jan 29 '14 at 06:13