Tutorials › How to change login logo

How to change login logo

Updated 4 years ago

Overview

Steps for changing the logo on your WordPress login page.

Steps

I. Upload your logo

  1. Click Media
  2. Click Add New
  3. Click Select Files
  4. Select your logo or image that you want to use for the login page
  5. Click the image after it has been uploaded
  6. Click Copy URL

II. Configure the login page to use your logo

  1. Open functions.php in your child theme folder
  2. Add the following code
function wps_login_logo() { ?>
    <style type="text/css">
        #login h1 a, .login h1 a {
            background-image: url(LOGO_URL);
        height:300px;
        width:300px;
        background-size: 100%;
        background-repeat: no-repeat;
        padding-bottom: 20px;
        }
    </style>
<?php }
add_action( 'login_enqueue_scripts', 'wps_login_logo' );
  1. Replace LOGO_URL with the URL that you copied earlier
  2. Save the file
  3. Visit your login page (example.com/login)
  4. Tweak the height and width values to ensure a good fit