WordPress, being as CMS, creates you with the login page by default to login to your site, in order to manage out your site as you need. However, it will by default, add its own logo with its own url, in the login form when you view the login page for your site, ie, http://yoursite.com/wp-login.php by default. So, what about if you want to change it as you like/need for your site? Is it really doable? Well, it is doable and here we will describe about how to change login logo url in WordPress.
How to view WordPress login page for your site?
Well, you may already know about how to view the login page for your site built within WordPress, right? If not then, you can view it via: http://yoursite.com/wp-login.php. However, it can be changed to any other url for better security of your site using the plugin for same available via the WordPress plugin directory.
Also, by default, the WordPress login page will look like the below screenshot as you may know already.

When do you need to change the WordPress default login logo image url?
Well, in some of the cases, you may create a site for your client, right? And on that site, they may also want to add their own url for login image to their login form too, right, since WordPress adds the url: https://wordpress.org by default? Well, on this case, you will need to change WordPress default logo image url to reflect their site branding/url.
Also, in some case, if they does not say the same too but, they are creating some of the social sites or eCommerce site then, most probably, you need to change the logo url to match their branding, since it is their brand service and they probably do not want to link to WordPress site at all, which may make the site as false positives.
Now, after knowing why to change the WordPress login logo image url, now, let’s move ahead to learn about how to change login logo url in WordPress.
How to change login logo url in WordPress?
In order to change, ie, customize your site, you need to edit the functions.php file of the theme. So, let’s move ahead and change login logo url for your site by pasting the below PHP code in the functions.php file of the theme:
function theme_slug_logo_url() {
// Add the required URL here to link
// it to the required link for your site.
// Here, we are returning the link to homepage.
return home_url( '/' );
}
add_filter( 'login_headerurl', 'theme_slug_logo_url' );
Since, WordPress uses the filter of login_headerurl
to return the logo image url for the login page, hence, above we have added the filter in that hook. So, after we have added the filter hook, the function now returns the homepage url for your site, as we have described above inside the created function. Now, after that, the login logo url will point to the home page of your site.
However, if you want to point it to any other url for same then, you can try the below PHP code instead for same:
function theme_slug_logo_url() {
return 'https://napitwptech.com';
}
add_filter( 'login_headerurl', 'theme_slug_logo_url' );
Also, what about the title shown when hovered over the logo image in login page? Well, we have got you covered up too in this case. For that, you can paste the below PHP code in the same file mentioned, ie, functions.php file of the theme:
function theme_slug_logo_url_title() {
return get_bloginfo( 'name' );
}
add_filter( 'login_headertitle', 'theme_slug_logo_url_title' );
Hence now, you may have got idea about how to change login logo url in WordPress for your site. Now, let’s see the output of the how to change login logo url in WordPress, shall we?
Output of the change login logo url in WordPress
Now, if you have added the mentioned code above in the required file, ie, functions.php of the theme, then, you will probably see the output of that as the screenshot below:

Here, in the above screenshot, you can find the difference between each before and after applying the filter. Also, to properly know it, in the image, we have shown you with the before and after applying the filter and marked the changes too. Now, from that, you can clearly see the changes seen in there after you apply the same.
You may also want to read:
- Tutorial On Creating WordPress Child Theme
- How To Create Meta Box In WordPress
- Recover Forgotten Password From Local WordPress Install
- How To Create Shortcode With Attributes In WordPress?
- How To Change Login Logo In WordPress?
Conclusion
If you have followed up the tutorial properly and now can change login logo url in WordPress with ease then, we can say that you are now more familiar on this than before. However, if you are still confused on the same and want to know more about it then, do drop the comment below in the comment box and we will follow it up.