Customize WordPress login links


Quick edits for your .htaccess file

While making some last minute updates to a website, I noticed that the login and registration links weren’t very good looking. I was using the s2Members membership plugin to handle user registrations, and the free version of the plugin uses the default wordpress links:

www.site.com/wp-login.php
www.site.com/wp-login.php?action=register

After a few minutes of searching online without much luck (I didn’t want to install another plugin), I remembered that I had tackled this before with the .htaccess file.

This is a super easy solution, and only requires adding the following lines to the top of the .htaccess file in your website’s root directory.

# Better login / register pages
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteRule ^login$ /wp-login.php [L]
	RewriteRule ^login/$ /wp-login.php [L]
	RewriteRule ^register$ /wp-login.php?action=register [L]
	RewriteRule ^register/$ /wp-login.php?action=register [L]
</IfModule>

If your login and register links are different than the defaults above, you should be able to simply swap in your personal variation.