How to Change WordPress login page logo

How to change the WordPress login page logo and URL without any plugins? Here is how we changed the default WordPress logo URL on the login page of BDLinks .Net. While there are plugins available for this, we will provide a quick code snippet that you can use to change the login logo URL in WordPress. If you want to use a plugin, you can do a Google search and find many options.

How to Change WordPress Login Page Logo & URL Without Plugin

You can change the default WordPress login page logo image with some PHP and CSS code. It also allows you to modify the logo’s width, height, bottom margin, and URL. WordPress adds its logo to the login page by default. However, I believe you should add your branding here by changing the default login logo and the URL of the logo to the homepage.

How to change wordpress login page logo and url without any plugin

Instructions to Change the Logo & URL

To begin, upload your custom logo to the media library. Copy the image URL and paste it somewhere useful, such as Notepad. Let’s add the code below to your Child Theme’s functions.php file. It shouldn’t be used in the main theme because updating the theme file will also replace the code.

The WordPress logo is only replaced by this code. It has no impact on the login page logo link, which we will replace with another code.

function bdlinks_login_logo() { ?>
    <style type="text/css">
        #login h1 a, .login h1 a {
            background-image: url(ADD-YOUR-LOGO-URL);
        background-size: 100px 100px;
        background-repeat: no-repeat;
        padding-bottom: 0px;
<?php }
add_action( 'login_enqueue_scripts', 'bdlinks_login_logo' );

Don’t forget to add the background-image URL inside the bracket that you copied earlier. You can also adjust other CSS properties to match your custom logo image. Change your logo height, weight, and margin, or do what you need to make it perfect.

Change the WordPress login page logo URL

Get a custom logo URL on the WordPress login page. Simply copy and paste the following code into your theme’s functions.php file. To change the logo image, paste it directly below the code you added.

function bdlinks_login_logo_url() {
    return home_url();
add_filter( 'login_headerurl', 'bdlinks_login_logo_url' );
function bdlinks_login_logo_url_title() {
    return 'Your Site Name';
add_filter( 'login_headertitle', 'bdlinks_login_logo_url_title' );

Replace ‘Your Site Name’ with the name of your website. The custom logo on your login screen will now link to the home page of your website. If you have any problems, do not understand something, or if anything we have shared is incorrect, please comment below.

How do I change my WordPress login page’s logo?

You can change the WordPress login page logo in two ways: by using a plugin or by writing custom code. To easily change it, we recommend using a custom code snippet mentioned in this Change WP Login Logo URL post. Most people do not want to add more plugins, and adding more plugins can make your site slower. So the best way is to use the custom function and customize it to your liking.

2 thoughts on “How to Change WordPress login page logo”

  1. Thanks for the helpful article! You can also disable login logo with the Disable Everything plugin. I like that it is very light and simple so that is doesn’t slow your website down. It also comes bundled with lots of other optimization features that speeds up your site.

Leave a Comment

Your email address will not be published. Required fields are marked *