How to Add Your Own Logo to the WordPress Login Page
Replace the WordPress logo on your login page with your own brand logo. No plugin needed — just a few lines of CSS and PHP.
Every WordPress login page shows the same thing: the WordPress logo, a login form, and a link back to wordpress.org. For client sites, this is a branding miss. Your client logs in daily and sees WordPress branding instead of their own.
Replacing the logo takes 5 lines of CSS. No plugin needed.
What is the login page logo?
The WordPress login page (wp-login.php) displays the WordPress “W” logo above the login form. It’s an <h1> element with a background image set via CSS. Clicking it goes to wordpress.org.
You can replace both the image and the link destination.
The quick fix
// Custom login logo
add_action( 'login_enqueue_scripts', function() {
echo '<style>
#login h1 a {
background-image: url(' . esc_url( get_theme_file_uri( 'images/logo.png' ) ) . ');
background-size: contain;
width: 100%;
height: 80px;
}
</style>';
});
// Change logo link to your site
add_filter( 'login_headerurl', function() {
return home_url( '/' );
});
// Change logo hover text
add_filter( 'login_headertext', function() {
return get_bloginfo( 'name' );
});
Upload your logo to your theme’s /images/ folder and adjust the height value to match your logo’s proportions. Use a transparent PNG for best results.
The one-click solution
Ovanap Admin Toolkit includes Custom login page logo under Admin Toolkit → Features → Admin UI. Pick your logo from the media library (it starts with your site logo if the theme has one), set its width and height, and choose the page background and button colours. The toolkit links the logo to your homepage, uses your site name as its text, and can hide the language switcher. No code, no theme file editing.
What happens after you fix this?
- Your brand logo appears on the login page instead of the WordPress “W”
- Logo links to your site instead of wordpress.org
- Professional client experience from the first login interaction
FAQ
What size should the logo be?
Aim for 320px wide maximum (the login form width) and any reasonable height. Use a transparent PNG or SVG. Retina displays benefit from 2x resolution images.
Does this change the logo in wp-admin?
No. The admin bar logo (WordPress “W” in the top-left) is separate. This only affects the login page.
Will a theme update overwrite my custom logo?
If you added the code to your parent theme’s functions.php, yes. Use a child theme, a code snippets plugin, or Ovanap Admin Toolkit to make the change persistent.
Related reads: