There are many situations when you want to change the login logo of WordPress login. When you deliver your website, Your client requests to use its logo instead of the WordPress default logo.
Many Developers achieve this task by changing the stylesheet and replace the default logo. But It is not an appropriate way.
You have to copy and paste the following PHP code to WordPress active plugin file or in the function.php file of your currently active theme.
function custom_prefix_my_login_logo() {
echo '<style type="text/css>
h1 a {
background-image:url('.get_bloginfo('template_directory').'/images/login-logo.gif) !important;
}
</style>';
}
add_action('login_head', 'custom_prefix_my_login_logo');