Tutorials

How to customize the WordPress login page

The WordPress login page looks the same on every site: a WordPress logo that links to WordPress.org, a white form and blue buttons. That’s fine for your own site, but on a site you build for a client, it’s the first thing they see every day, and it doesn’t look like theirs.

It’s also one of the few screens your theme doesn’t reach. The login page is part of WordPress itself, not your theme, so nothing you set in the Site Editor or in Styles shows up there. To change it, you either use a plugin or add a few lines to your theme. I’ll show both.

With a plugin

If you don’t want to touch code, a plugin is the quickest route. The most popular one is LoginPress, with more than 200,000 active installs. You change the logo, background, colors and form in a live preview, and the free version covers everything in this tutorial.

Most login plugins, LoginPress included, are built on the Customizer. Block themes hide “Appearance” → “Customize” from the menu, but the Customizer still works, and these plugins still use it.

The catch is that it’s one more plugin for something that takes a few lines of code, and plugins like this tend to grow into login security, redirects and social logins you may not want. If you’re comfortable adding code to your theme, the next section does the same thing without one.

With code

WordPress has hooks for exactly this. Add the following to your theme’s functions.php. It loads a small stylesheet on the login page, uses your site icon as the logo, links the logo to your site instead of WordPress.org, and gives the logo your site’s name as its text. The site icon is the square image you set under “Settings” → “General” → “Site Icon”, the same one browsers show in the tab. If you haven’t set one, the WordPress logo stays.

/**
* Loads the theme's login stylesheet and uses the site icon as the login logo.
*/
function my_login_styles() {
wp_enqueue_style(
'my-login',
get_theme_file_uri( 'assets/css/login.css' ),
array( 'login' ),
wp_get_theme()->get( 'Version' )
);
$icon = get_site_icon_url( 168 );
if ( $icon ) {
wp_add_inline_style( 'my-login', '.login h1 a { background-image: url(' . esc_url( $icon ) . '); }' );
}
}
add_action( 'login_enqueue_scripts', 'my_login_styles' );
/**
* Links the login logo to the site's front page instead of WordPress.org.
*
* @return string The logo link URL.
*/
function my_login_logo_url() {
return home_url( '/' );
}
add_filter( 'login_headerurl', 'my_login_logo_url' );
/**
* Uses the site title as the login logo's link text.
*
* @return string The logo link text.
*/
function my_login_logo_text() {
return get_bloginfo( 'name' );
}
add_filter( 'login_headertext', 'my_login_logo_text' );

The logo’s link text is hidden on screen, but it’s what screen readers announce. By default it says “Powered by WordPress”, so changing it to your site’s name is a small accessibility fix too.

If you didn’t make your theme yourself, add the code and the stylesheet to a child theme instead. Otherwise, the next theme update will remove them.

Then create assets/css/login.css in your theme. Since WordPress 7.0, the login page takes its buttons, links and focus colors from three CSS variables, so you can change the accent color without restyling every element:

body.login {
background: #f4f1ea;
--wp-admin-theme-color: #2f5d50;
--wp-admin-theme-color-darker-10: #264c41;
--wp-admin-theme-color-darker-20: #1d3b32;
}
.login h1 a {
background-size: contain;
border-radius: 16px;
}

Replace the colors with your own: the main color for buttons and the two darker versions for hover and focus. If you’d rather use a logo file than the site icon, leave out the site icon lines in functions.php and set background-image on .login h1 a in the stylesheet instead, with a width that fits your logo.

Notes

  • On WordPress.com, you may not see it. Sites on WordPress.com, and other sites using Jetpack’s WordPress.com login, can send wp-login.php to WordPress.com’s own login page, so your custom one never shows. The setting is under “Jetpack” → “Protect” → “Settings”: “Allow users to log in with their WordPress.com account”.
  • Keep it simple. The login page is also where people reset their password, register and see error messages, and all of those use the same styles. Change the logo and colors, check the “Lost your password?” screen, and stop there.
  • Changing the login address is a different thing. Moving wp-login.php to another URL is a security measure, not a design change. See how to change the WordPress login URL.

Published December 2, 2026