How to Change WordPress Admin URL

To keep your WordPress login page safe and prevent attackers from accessing your admin login, you need to change the login URL to a new unique URL. This could really help when it comes to fighting attacks, hacks, and brute-force attacks.

To change the WordPress Admin URL, you can use a plugin such as “WPS Hide Login” or you can manually edit the functions.php file in your WordPress theme. You can use plugins like iThemes Security, WPS Hide Login plugins, etc.

NOTE: Make sure that you generate a full backup of your website before proceeding with any changes,

Change Your WordPress Login Page Using the WPS Hide Login plugin

The easiest way to change your WordPress login URL page is by using a free plugin like WPS Hide Login, The plugin is very lightweight, and it doesn’t change any files in the core or add rewrite rules.

  • Log into the WordPress dashboard
  • Go to plugins
  • Add new
  • Search for the WPS Hide Login plugin
  • click Install Now.
  • Proceed to activate the plugin
  • After activation, Go to Settings > WPS Hide Login
  • Enter a new URL for the login page and save the changes
  • The link to the WordPress Dashboard will be changed from to
  • Your new login page will become effective and your old login URL will no longer work!

Change Your WordPress Login Page Using The functions.php File
Manual Method:

  • Access the functions.php file in your WordPress theme
  • Add the following code:
function custom_admin_url() { return ‘/my-secret-login’; } add_filter(‘login_url’, ‘custom_admin_url’);
Replace ‘/my-secret-login’ with your desired login URL Save the functions.php file
You may need to log out and log back in for the changes to take effect

Please note that changing the URL of the login page does not provide full security for your website, it is just an extra layer of protection to make it harder for hackers to find the login page.

Another way to change your WordPress login page is to edit your .htaccess file by using a password-protect to protect your login page with a .htpasswd. This will restrict those without passwords to access the login page.

If you enjoyed this article, then you’ll love Zalvis's Cloud Hosting platform. Turbocharge your website and get 24/7 support from our veteran team. Our world-class hosting infrastructure focuses on auto-scaling, performance, and security. Let us show you the Zalvis difference! Check out our services.