How to Change the Logo on WordPress Login Page

Lot of people use WordPress as Community Website, or as a Service Website which required users to login, so here is a way to change the default WordPress logo image to your Orgnazation logo or whatever you want to.

You can change it by many ways

Editing the CSS at /wp-admin/css/wp-admin.css
Replacing the wordpress-logo.png  image at /wp-admin/images/wordpress-logo.png

The Methods above will be overwritten when you update WordPress

so the best way is to add this code to your functions.php file located at your current Theme

usually at /wp-content/themes/Your_Theme/functions.php
function custom_loginlogo() {
echo '<style type="text/css">
h1 a {background-image: url('.get_bloginfo('template_directory').'/images/login_logo.png) !important; }
</style>';
}
add_action('login_head', 'custom_loginlogo');
upload login_logo.png to /wp-content/themes/Your_Theme/images
and your done
refer to Customize WordPress login page
Tags: ,
fold-left fold-right
About the author

I’m d3mha, and i <3 WordPress

2 Replies to How to Change the Logo on WordPress Login Page

  1. pingram says:

    Nothing against the author but this is terrible that in 2017 we can’t suggest a way to eliminate the payload of the original image. Should be a simple filter.

    • pingram says:

      Ok, my original comment is a tad opinionated so I should at least back it up and add that it can be done but not efficiently the way WordPress bundles the logo images (yes there is two) via wp-admin.css so one would have to un-register wp-admin.css and then re-enqueue their own version with the custom image and then be mindful of future updates to ensure a newer version doesn’t need to be updated. A lot of work to override two lines of css but the alternative loading two images costing 4.6kb on top of the original isn’t practically good either, it’s a really bad band aid. Still seems a little behind the times IMO.

      Maybe team WP should consider wrapping an actual image element vs css so it CAN be filtered via functions.php and be much simpler to override and no payload cost.

Leave a Reply