Change the default WordPress login image and destination URL

Change the default WordPress login image and destination URL

When you login to wordpress, you see the default wordpress logo and if you click on this, it takes you to the website. This tutorial will teach you how to change the image, and the URL.


    1. Take a backup of your theme functions.php file (/wp-content/themes/<yourtheme>/functions.php) before proceeding.
    2. In your theme directory, navigate to your functions.php file. You can do this through WordPress by going to Appearance > Editor > Then find the functions.php file on the right hand side.
    3. Scroll to the bottom of the functions.php file, and copy and paste the following code before the closing ?> PHP bracket.

//Change link of WP-Login image
function wpc_url_login(){
return ""; // your URL here
add_filter('login_headerurl', 'wpc_url_login');// Custom WordPress Login Logo
function login_css() {
wp_enqueue_style( 'login_css', get_template_directory_uri() . '/stylesheet/login.css' );
add_action('login_head', 'login_css');

    1. You will need to the URL where it says // your URL here to your URL of choice.
    2. You will now need to add a CSS file to your theme stylesheet directory (/wp-content/themes/<yourtheme>/stylesheet/) called login.css
    3. Add the following code to the login.css file

.login h1 a { width:326px; height:163px; background-size: 326px 163px; background-image: url('/wp-content/themes/<yourtheme>/images/wp-login-logo.png');}

  1. Adjust the dimensions of the CSS properties to match the size of the image that you want to use on the login page.
  2. Rename your chosen image ‘wp-login-logo.png’ and upload your it to your theme images folder (/wp-content/themes/<yourtheme>/images/)
  3. Logout of WordPress, and navigate to your WordPress login page. Your chosen image should be displayed with the new target URL.