I want to change the login URL per a client request.

so, instead of mysite.com/wp-login.php

or mysite.com/wp-admin

it is this: mysite.com/someotherpagename.php
or mysite.com/someotherpagename

I do not want to use /login. It's too obvious, per the client.

Thanks in advance.

  • 1
    Security by obscurity is not security. Changing the login path won't make things safer, just harder to maintain in the future. – EAMann Jan 30 '13 at 3:11
  • 1
    If it stops thousands of bots finding your site and doing a DOS attack it is a level of security. – S.. Nov 4 '13 at 12:55

Open your .htaccess file and add Rewrite Rules:

RewriteRule ^myregister/?$ /wp-login.php?action=register [QSA,L]
RewriteRule ^mylogin/?$ /wp-login.php [QSA,L]

If your wordpress installed in a subdirectory:

RewriteRule ^myregister/?$ /subdirectory/wp-login.php?action=register [QSA,L]
RewriteRule ^mylogin/?$ /subdirectory/wp-login.php [QSA,L]
  • Thanks for your code, It worked but; it just added new access to the login but the original one still there and any hacker can reach to it! – shady sherif Sep 20 '17 at 6:33

You can do it very easy using WPS hide login plugin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.