The default login URL for WordPress is like this:

http://your_domain_name.com/wp-login.php

This means everyone knowing the login URL of your website, which can pose a big security risk. So, how to hide the wp-admin login address?

The following will modify the theme functions.php to achieve the purpose of hiding the wp-admin URL. The advantage of this method is that every time you upgrade WordPress, your site will not return to the default login URL.


How to hide WordPress login URL?

1)Find the functions.php file, such as the theme name is ‘aimeesign’, under normal circumstances, the path is as follows:

\wp-content\themes\aimeesign\functions.php

2)Copy and paste the code to the end of the file and customize the address.

// Change WordPress login URL
add_action('login_enqueue_scripts','login_protection');
function login_protection(){
if($_GET['master'] != 'aimeesign' && !isset($_GET['action']))header('Location: index.php'); }

Among them, ‘aimeesign’ can be arbitrarily modified to your custom name, the above code is written, and the final login URL is as follows:

http://your_domain_name.com/wp-login.php?master=aimeesign

Modifying the WordPress login URL is one of the measures to strengthen your site’s security. The best way is to use a super strong password and modify it regularly.