How to Customize Your WordPress Login and Registration Pages

Teli Adlam —  June 9, 2007

OptiNiche registration page More than a few people have noticed that the login and registration pages for this blog looks like the rest of the site and aren’t the standard WordPress pages. As a result, I’m asked, frequently, how I did it.

My first suggestion is that you use a plugin; WordPress Custom Login[1] is supposed to skin your WordPress registration, login, and lost password form without the need to modify any core files (which my method involves).

The newest version even allows you to customize registration e-mails that get sent out. Since there hasn’t been much mention on the site since the update to work with 2.0.x, I’m not sure if it is compatible with the most recent version of WordPress.

Of course, I needed a lot more control over my login page than the plugin provided (plus, my site existed long before the plugin existed ;)), so my login and registration forms are modified core files. In order to get the exact look and wording I wanted to appear on the those pages, I modified the wp-login.php and wp-register.php files manually.

If you embark on a similar journey, make sure that you always back up your files before making your changes, that you don’t accidentally modify any important code — stick to modifying the header/body/footer HTML — and, remember, if you decide to upgrade your installation of WordPress in the future, you’ll need to update those new files, too.

[1] The link was removed since the site is no longer available.

[tags]wordpress login customization, wordpress registration customization, custom login page, custom registration page[/tags]

Teli Adlam

Posts

8 responses to How to Customize Your WordPress Login and Registration Pages

  1. Could you articulate the way you approached modifying the wp-login.php and the wp-register.php files, especially if you have a side bar?

    Thanks, Steve

  2. I did the same with my blog at:

    http://www.untouchablesunderground.com/dojo/wp-login.php

    It’s actually pretty easy.

    There’s a line of code in the wp-login file that goes something like this: admin.css…

    Look for that line and delete it.

    And, replace with with a link to your site’s stylesheet.

    Voila!!

    You’ll notice your login will already look much more like your site. Then, as Teli said, just look for the header/body/footer/html inside all that code and play with it a little.

    My approach was to make two copies of the wp-login file and use one as my back-up and just play around with the other one until I figure out what did what.

    [EDIT: HTML code is stripped out by WordPress unless the brackets are properly escaped.]

    You can play with those sections to add changes to each of the 3 parts of wp-login.

  3. I’ve found only two instances of “css” in the wp-login.php file.

    wp_admin_css( ‘login’, true );
    wp_admin_css( ‘colors-fresh’, true );
    do_action(‘login_head’);

    So, right now, I can’t figure out how to accomplish this mega-cool task. Frankly, the login page could just be a post…no?

    Best,
    Dainis

  4. Just to let you know – the link to jameskelly is blocked by firefox as a malicious site. Someone probably either hijacked his domain or he’s been infected by a worm.. someone should let him know.

  5. I figured it out – you need to replace:

    wp_admin_css( ‘login’, true );
    wp_admin_css( ‘colors-fresh’, true );

    with:

    <link rel=”stylesheet” href=”" type=”text/css” media=”screen” />

    make sure that the php tags are closed, just in case it breaks.

  6. I’m really trying to accomplish getting a login/register form WITHIN a page on my blog. Is there any way to do this? Or is there even a plugin to accomplish this?

  7. The link to “WordPress Custom Login Plugin” is broken in this post.

  8. @EstateYard: You can get the form anywhere you want by copying the <form> code and making sure the action points to your wp-login.php page.

    @Jay: Thank you. It looks like the entire site has gone bye-bye.