How to rename wp-login.php for better WordPress security

Lots of WordPress websites are getting regular wp-login.php brute force attack. This also causes high CPU and memory usage on server. So it is highly recommend for WordPress websites administrator to change wp-login.php url to improve WordPress website security.

In this tutorial We will explain how to change wp-login.php to any other name.

Open wp-login.php file in any text editor. Find and replace all wp-login.php to wp-login-new.php.

We are here using wp-login-new.php, You can use nay other name according to your choice.
Save the file and close it.

Rename wp-login.php file to wp-login-new.php

Create a new blank file and name it as wp-login.php

Now open .htaccess file located in public_html directory and add following code at the top.

ErrorDocument 401 default

Now your WordPress login url will be:

domain.com/wp-login-new.php

And yourdomain.com/wp-login.php file will open a blank page.

Done!