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
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
OvKit includes Custom Login Logo under Features → Frontend. Upload your logo through the WordPress media library, and OvKit handles the CSS, link URL, and hover text automatically. 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 OvKit to make the change persistent.
Related reads: