Custom Login page for WordPress

For those of you who frequently log into and comment on various WordPress blogs (and you know who you are), you may have noticed that the login page is conspicuously unthemed, and looks virtually the same on every WordPress blog on the internet. The savvy user may also have noticed that the login page on this blog is themed. Go ahead, take a look. I’ll wait…

Pretty cool, eh? I submitted a patch via Trac for version 2.3.3 back in February, and updated it today to be compatible with 2.5.1. Well, if the Milestones on the ticket are to be believed, the plan is to incorporate this feature into version 2.6. If you can’t wait that long to pimp your login page, you can get the patch and sample login.php theme page from the Trac ticket. Just patch wp-login.php in your WordPress folder and drop the login.php file in your theme.  Use your own css to style the form, and the new login page will pull in your theme’s header, footer and sidebar, just like any other page.

UPDATE: Looks like they didn’t like the approach that I took for the patch, so they’ve pushed this feature back to 2.7 to give it some more development time.  To each his own, I guess.  I’ll be reworking this patch and resubmitting soon.

Tags: , , ,

8 Responses to “Custom Login page for WordPress”

  1. The Naked Green » Themed Login Page Built-In Says:

    […] David Still (Viper007Bond) has come up with a solution and opened up a Trac entry on to add hooks to wp-login.php! As of right now, it’s scheduled to officially be added to the wordpress core files in version 2.6! I can’t wait to start testing it and here I am blogging about it already. I’m excited by strange things ’tis true! […]

  2. Glitch Says:

    Hello David,

    When will you come up with the patch for WordPress 2.6. I really need this to make my site a little bit more professional. I cant believe WordPress still hasnt got themed login, registration and profile pages.



  3. stealth dave Says:

    The next release for this patch will either come when I get around to updating my own blog to 2.6 or when I take the time to rework the patch to something that they will commit to the main branch (see the UPDATE in the post). Have you tried applying the patch as-is to 2.6? I don’t know how much they’ve changed the login code, but if it hasn’t gone through too many updates, it might still apply.

    – Dave

  4. Glitch Says:

    Just tested it on a WP2.6 test installation and it seems to work just fine for as far as I tested it. The code of wp-login.php has changed only slightly I think.

    Hopefully themed login/registration and maybe even profile will become standard from 2.7.

  5. StrangeAttractor Says:

    How do you install a patch?

    I’m kind of grieving over the loss of James Kelly’s Themed Login & Registration — it was perfect and did exactly what I wanted — to embed the login form in the theme.

    But it hasn’t been updated in a long time, and his site appears to be no longer maintained.

    So, your solution here seems very close to what I want… but I don’t understand how to install a patch…

  6. bambi Says:

    Hi David,
    I love your login/register – on your site though, I could not make it on mine 🙁
    I downloaded the 2 files and placed them in the respective directories, but I could not make it work.
    Can you send me the 2 files? and a short cookbook of how to do this? Will you make a plugin out of this?

  7. stealth dave Says:

    bambi and StrangeAttractor, here are some simple instructions to get this working. Please keep in mind that this was developed for WordPress 2.5.2, and may or may not work with later versions.

    First, the sample.login.php is just that; a sample. For most themes, you should be able to just rename it to login.php and it will include your header, navs, etc., but you may need to modify it to fit your theme.

    For the diff file, you need to apply this patch to wp-login.php. On *NIX-based systems, you can do this fairly simply from the command-line. In the same folder as wp-login.php, run the following command:

    patch -p0 < wp-login.php.diff

    For information on how to use patch on Windows, check out this link. I’m told that this patch applies cleanly to 2.6 (thanks for testing that, Glitch), but again, no guarantees.

    – Dave

  8. Still Designing » Blog Archive » WordPress Custom Themed Login Gets An Update Says:

    […] Original Themed Login post […]

Leave a Reply

You must be logged in to post a comment.