How to redirect wp-login.php in WordPress 3.1+ without changing core files!

I needed to redirect the “wp-login.php” url for a while and I finally figured out a way (without modifying the core files) in wordpress by making a simple plugin. This plugin is so simple I didn’t bother posting it on wordpress.org.

So here’s is the file to make a quick and dirty plugin that redirects the “wp-login.php” in wordpress 3.1+ :

Download DP “wp-login.php” redirect plugin

After downloading, change the “wp_redirect” value (which is set to “/login.html”) to whatever you need by editing the plugin itself.

This plugin is possible now because the wordpress team added “login_enqueue_scripts” action (which currently does nothing I think) which gets triggered before the headers so it possible to send a redirect without errors.

Hope this helps someone out because I’ve needed this for many projects and I’m now happy there’s way to do it in combination with version 3.1 changes in the wp-login.php file.