Skip to content

How To Hide WordPress Login URL

When we set up a WordPress site for our client, we don’t want our clients to mess around with WordPress’ default login URL – wp-login.php. It’s bit hard for non-WP people to remember these URLs, so we want to give him an easy login URL.

So we are going to change the URL http://www.mywebsite.com/wp-login.php to http://www.mywebsite.com/login

It’s clean, simple & much easier to remember. So how much coding we need for it? – Just a single line!

Just add following line to the .htaccess file in the root folder of your website:

RewriteRule ^login$ http://www.yoursite.com/wp-login.php [NC,L]

Replace yoursite.com with your own domain name. Of course, you can perform this redirection with other URLs too.

4 thoughts on “How To Hide WordPress Login URL”

    1. Sorry but this snippet just redirects the /login url to your /wp-login.php url. It has nothing to do with the login process.

  1. What happens when I use the code above in my .htaccess and I use the old /wp-login.php url to log in? I still get to the login page, right? And what happens if I add this line to my .htaccess and I use /wp-admin? I will be redirected to the login page, right? So could you explain to me what you mean with you blog title: How To Hide WordPress Login URL? Especially the word hide. If you don’t type the word wp-login.php it doesn’t mean that you have hidden it.

Leave a Reply

Your email address will not be published. Required fields are marked *