Scriptbaker
SCRIPTBAKERAI & Software Engineering
WordPress

Change WordPress login screen logo

Learn how to replace the default WordPress login screen logo with your own branding. This guide covers the classic CSS-injection method, the modern enqueue approach, and how to update the logo link and title for a fully white-labelled login page.

· 6 min read · By Tahir Yasin

How to Customize the WordPress Login Logo and Login Page in WordPress

WordPress provides a clean and functional login screen out of the box, but the default page still displays WordPress branding. For agencies, freelancers, developers, SaaS businesses, membership websites, and client projects, replacing the default WordPress login logo with a custom brand logo can create a more professional and consistent experience.

A branded WordPress login page does not require rebuilding the entire authentication system. You can customize the logo, logo link, login page colors, background, form styling, typography, messages, and other visual elements using WordPress hooks and CSS.

In this guide, you will learn how to change the WordPress login logo, customize the login page with CSS, update the logo destination URL, change the accessible login header text, create a dedicated login stylesheet, troubleshoot common problems, and build a more complete white-label WordPress login experience.

Why Customize the WordPress Login Screen?

By default, WordPress displays its own logo and branding on the login screen. That is perfectly suitable for many websites, but it may not match the branding of a professionally designed client website.

For example, an agency building a website for a restaurant, SaaS company, online store, membership platform, or professional service business may want the login screen to use the client's logo and visual identity rather than the default WordPress branding.

Customizing the login screen can help you:

  • Replace the default WordPress logo with a company logo.
  • Create a consistent brand experience for website administrators.
  • Make client websites feel more customized and professionally delivered.
  • Change the destination of the login logo.
  • Customize the login page background and colors.
  • Improve the visual consistency between the public website and WordPress administration.
  • Create a white-label experience for agencies and developers.
  • Make the login form more appropriate for membership or SaaS-style websites.

WordPress provides dedicated hooks for customizing the login screen, including login_enqueue_scripts, login_head, login_headerurl, and login_headertext.

What Can You Customize on a WordPress Login Page?

Changing the logo is only one part of WordPress login customization. Depending on the requirements of the website, you can customize several parts of the login experience.

  • Login logo: Replace the default WordPress logo with a custom image.
  • Logo link: Send visitors to the website homepage or another relevant destination.
  • Logo text: Change the accessible link text associated with the login logo.
  • Background: Add a brand color, gradient, image, or other background treatment.
  • Login form: Adjust width, spacing, borders, shadows, colors, and typography.
  • Buttons: Customize the login button to match the website's design system.
  • Links: Style links such as “Lost your password?” and the back-to-site link.
  • Messages: Add helpful branding or instructions above the login form.
  • Responsive behavior: Make sure the design works on phones, tablets, and desktop screens.

Method 1: Customize the Login Logo with the login_enqueue_scripts Hook

The recommended approach for loading login-page CSS is the login_enqueue_scripts hook. WordPress documents this hook specifically for enqueuing styles and scripts on login and related authentication screens.

You can use it to add custom CSS that replaces the default WordPress logo.

function scriptbaker_custom_login_logo() {
    ?>
    <style type="text/css">
        #login h1 a {
            background-image: url('<?php echo esc_url( get_stylesheet_directory_uri() . '/images/custom-login-logo.png' ); ?>');
            background-repeat: no-repeat;
            background-position: center;
            background-size: contain;
            width: 220px;
            height: 90px;
        }
    </style>
    <?php
}
add_action( 'login_enqueue_scripts', 'scriptbaker_custom_login_logo' );

Place your logo in an images folder inside the active theme or child theme:

/wp-content/    /themes/        /your-child-theme/            /images/                custom-login-logo.png

Using get_stylesheet_directory_uri() is useful when working with a child theme because it points to the active stylesheet directory rather than automatically assuming the parent theme directory.

Method 2: Enqueue a Dedicated Login Stylesheet

If you are making several design changes, keeping all login CSS in a separate stylesheet is generally easier to maintain than putting a large CSS block inside functions.php.

Add the following code to your theme's functions.php or, preferably for site-specific functionality, a site-specific plugin:

function scriptbaker_login_stylesheet() {
    wp_enqueue_style(
        'custom-login',
        get_stylesheet_directory_uri() . '/css/login.css',
        array(),
        '1.0.0'
    );
}
add_action( 'login_enqueue_scripts', 'scriptbaker_login_stylesheet' );

Then create:

/css/login.css

Add your logo styles:

body.login #login h1 a {
    background-image: url('../images/custom-login-logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 220px;
    height: 90px;
    display: block;
    margin: 0 auto 20px;
}

This approach is particularly useful when the login page requires a complete visual redesign because the CSS can remain separate from PHP functionality.

Method 3: Change the WordPress Login Logo URL

Changing the logo image does not automatically change where the logo links. WordPress provides the login_headerurl filter for modifying the URL associated with the login header logo.

For example, you can make the logo point to the website homepage:

function scriptbaker_login_logo_url( $url ) {    return home_url( '/' );}add_filter( 'login_headerurl', 'scriptbaker_login_logo_url' );

Now, when a user clicks the custom logo, they will be taken to the website homepage instead of the default WordPress destination.

Method 4: Change the Login Logo Text

Modern WordPress versions provide the login_headertext filter for changing the text associated with the login header logo. WordPress introduced this filter in version 5.2.0.

You can use it like this:

function scriptbaker_login_logo_text( $text ) {    return get_bloginfo( 'name' );}add_filter( 'login_headertext', 'scriptbaker_login_logo_text' );

The older login_headertitle filter is deprecated. For new implementations, use login_headertext instead. WordPress documentation specifically notes that the older title-based approach was deprecated in version 5.2.0.

Complete WordPress Custom Login Logo Code

If you want a simple implementation that combines the main pieces, you can use the following code:

/**
 * Customize the WordPress login logo.
 */
function scriptbaker_custom_login_logo() {
    ?>
    <style type="text/css">
        body.login #login h1 a {
            background-image: url('<?php echo esc_url( get_stylesheet_directory_uri() . '/images/custom-login-logo.png' ); ?>');
            background-repeat: no-repeat;
            background-position: center;
            background-size: contain;
            width: 220px;
            height: 90px;
            display: block;
            margin: 0 auto 20px;
        }
    </style>
    <?php
}
add_action( 'login_enqueue_scripts', 'scriptbaker_custom_login_logo' );
/**
 * Change the login logo URL.
 */
function scriptbaker_login_logo_url( $url ) {
    return home_url( '/' );
}
add_filter( 'login_headerurl', 'scriptbaker_login_logo_url' );
/**
 * Change the login logo link text.
 */
function scriptbaker_login_logo_text( $text ) {
    return get_bloginfo( 'name' );
}
add_filter( 'login_headertext', 'scriptbaker_login_logo_text' );

This provides the basic foundation for a branded WordPress login screen without modifying WordPress core files.

How to Customize the Entire WordPress Login Page

If replacing the logo is not enough, you can use CSS to customize the rest of the login interface.

Change the Login Page Background

body.login {    background: #f5f7fa;}

You can also use a background image:

body.login {
    background-image: url('../images/login-background.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

Customize the Login Form

body.login #loginform {    border-radius: 12px;    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);}

Customize the Login Button

body.login .wp-core-ui .button-primary {    border-radius: 6px;    padding: 8px 20px;}

Customize Login Links

body.login #nav a,body.login #backtoblog a {    text-decoration: none;}

Use your brand's existing design system rather than adding unrelated colors or visual effects. The login page should feel like an extension of the website, not a completely separate interface.

Use a Child Theme Instead of Editing a Parent Theme

If the website uses a parent theme, avoid placing custom login functionality directly into the parent theme when possible. Theme updates can overwrite modified theme files.

A child theme or site-specific plugin provides a safer place for custom functionality.

For client websites, a site-specific plugin can be particularly useful when the customization should remain active even if the visual theme is replaced in the future.

Should You Put the Code in functions.php or a Plugin?

Both approaches can work, but the choice depends on what the customization represents.

ApproachBest For
functions.phpTheme-specific visual customization
Child themeClient websites where the parent theme is updated regularly
Site-specific pluginFunctionality that should survive a theme change
Login customization pluginUsers who prefer configuration instead of custom code

If the customization is purely part of the site's visual identity, a child theme can be appropriate. If it represents functionality that should remain regardless of the theme, a small site-specific plugin is often easier to maintain.

Custom Login Logo vs. WordPress Login Plugin

You do not necessarily need a plugin just to replace a login logo. A few lines of CSS and PHP can handle the basic customization.

A plugin becomes more useful when you need a visual editor, multiple login templates, custom backgrounds, advanced form controls, login redirects, or other features that would otherwise require maintaining custom code.

For a developer who only needs a branded logo and a few CSS changes, a lightweight custom implementation can keep the website simpler.

Accessibility Considerations for a Custom WordPress Login Page

Branding should not come at the expense of usability or accessibility.

When customizing the WordPress login screen:

  • Maintain sufficient color contrast between text and backgrounds.
  • Do not hide important interface text purely for visual reasons.
  • Keep keyboard navigation usable.
  • Make focus states visible.
  • Use a logo with appropriate dimensions and sufficient resolution.
  • Do not make the login form excessively narrow or difficult to use on mobile devices.
  • Use meaningful login header text rather than relying only on an image.
  • Avoid using an inaccessible image-only interface.

WordPress itself has moved from the deprecated login_headertitle approach toward login_headertext, with the developer documentation noting accessibility considerations around the old title attribute.

Responsive Design for the WordPress Login Logo

A logo that looks good on a desktop monitor may not work well on a small phone screen. Avoid hard-coding dimensions that cause the logo to overflow the login container.

You can use responsive CSS such as:

body.login #login h1 a {
    width: min(220px, 80vw);
    height: 90px;
    background-size: contain;
}
@media (max-width: 480px) {
    body.login #login h1 a {
        width: 180px;
        height: 70px;
    }
}

Test the login page at different viewport sizes after making changes.

How to Choose the Right Login Logo Image

Your logo should be optimized specifically for the login screen.

  • Use a transparent PNG or another suitable image format when appropriate.
  • Use enough resolution for high-density displays.
  • Keep unnecessary whitespace around the logo to a minimum.
  • Use dimensions that work naturally inside the login container.
  • Compress the image before uploading it.
  • Make sure the logo remains recognizable against the selected background.

Do not upload an unnecessarily large image just because it will be displayed at a small size. An optimized asset helps avoid unnecessary page weight.

Common Problems When Changing the WordPress Login Logo

The Old WordPress Logo Is Still Showing

This is often caused by CSS specificity, browser caching, caching plugins, or an incorrect image path.

Check that:

  • The image URL is correct.
  • The CSS is actually loading on wp-login.php.
  • Your selector is specific enough.
  • The browser cache has been cleared.
  • A caching or optimization plugin is not serving an outdated stylesheet.

The Logo Is Cut Off

Check the width, height, background size, and spacing around the logo. background-size: contain can help preserve the logo's proportions within its container.

The Logo Looks Blurry

Use a higher-resolution source image and make sure the image is not being stretched far beyond its intended display dimensions.

The Logo Links to WordPress.org

Add the login_headerurl filter to change the destination:

function scriptbaker_login_logo_url( $url ) {    return home_url( '/' );}add_filter( 'login_headerurl', 'scriptbaker_login_logo_url' );

The CSS Works on Desktop but Not on Mobile

Inspect the page at a smaller viewport and use responsive CSS. Also check whether the logo's fixed width is larger than the available login container.

Do Not Modify WordPress Core Files

A common mistake is editing files inside the WordPress core installation to replace the login logo. This should be avoided.

WordPress provides hooks specifically for modifying the login page. Using those hooks means your customization can be maintained without changing core files. The login_enqueue_scripts, login_head, login_headerurl, and login_headertext hooks are part of the supported customization approach.

Does Changing the WordPress Login Logo Improve SEO?

Changing the WordPress login logo is primarily a branding and user-experience customization. It should not be treated as a direct Google ranking tactic.

The value comes from creating a consistent administrative experience for site owners, editors, clients, and internal teams. SEO improvements should instead focus on factors such as useful content, technical accessibility, performance, structured data where appropriate, internal linking, search intent, and overall website quality.

In other words, customize the login page for branding and usability, not because replacing the logo alone will improve organic rankings.

WordPress Login Logo Customization for Agencies

For web development agencies and freelancers, a branded login screen can be useful when delivering websites to clients.

Instead of presenting a generic WordPress login page, the client can see their own brand when accessing the website dashboard.

This is particularly relevant for:

  • WordPress development agencies
  • Freelance WordPress developers
  • Corporate websites
  • Membership websites
  • Online communities
  • Educational platforms
  • WooCommerce stores
  • Content publishing websites
  • Client portals
  • Multi-site website projects

WordPress Login Page Customization Checklist

Before publishing your changes, use this checklist:

  • Custom logo loads correctly.
  • Logo maintains its proportions.
  • Logo links to the intended destination.
  • Login header text is meaningful.
  • Login form remains usable.
  • Buttons have sufficient contrast.
  • Keyboard navigation still works.
  • Mobile layout has been tested.
  • Logo image has been optimized.
  • No WordPress core files were modified.
  • Custom code is stored in a maintainable location.
  • Login functionality still works after customization.

Frequently Asked Questions About Customizing the WordPress Login Logo

How do I change the WordPress login logo?

You can change the WordPress login logo by adding custom CSS through the login_enqueue_scripts hook and replacing the default logo background image with your own logo. The CSS can be placed inline or loaded from a dedicated stylesheet.

What is the best hook for WordPress login CSS?

login_enqueue_scripts is the WordPress hook intended for enqueuing styles and scripts on login and related authentication screens. It is generally preferable to use it when loading a dedicated login stylesheet.

How do I change the WordPress login logo URL?

Use the login_headerurl filter. You can return home_url( '/' ) to make the logo link to the website homepage.

How do I change “Powered by WordPress” on the login page?

Use the login_headertext filter to change the text associated with the login header logo. This is the current filter intended for this purpose.

Is login_headertitle still recommended?

No. The login_headertitle filter was deprecated in WordPress 5.2.0. New implementations should use login_headertext instead.

Can I customize the WordPress login page without a plugin?

Yes. You can customize the login logo, styles, logo URL, and header text using WordPress hooks and CSS without installing a dedicated login customization plugin.

Can I customize the WordPress login background?

Yes. The login page can be styled with CSS to add a solid background color, image, gradient, or other visual treatment.

Should I edit WordPress core files to change the login logo?

No. Use WordPress hooks and your theme, child theme, or site-specific plugin instead. Core-file modifications can be overwritten during WordPress updates and make maintenance more difficult.

Can I customize the WordPress login page for a client website?

Yes. Agencies and developers can create a branded login experience using the client's logo, colors, typography, and other design elements while keeping WordPress's underlying authentication functionality.

Does a custom WordPress login logo improve Google rankings?

Not directly. A custom login logo is mainly a branding and user-experience improvement. It should not be considered a standalone SEO ranking technique.

Conclusion

Customizing the WordPress login logo is a small development task that can make a client website feel significantly more polished. The basic implementation requires only a few lines of CSS and PHP, while a complete branded login experience can include a custom logo, background, form styling, buttons, links, responsive behavior, and accessible login text.

For new implementations, login_enqueue_scripts is a useful hook for loading login-page styles, while login_headerurl can change the logo destination and login_headertext can customize the associated login header text.

The key is to keep the implementation lightweight, maintainable, responsive, and separate from WordPress core files.

Last updated:

Work with Scriptbaker

Let's talk about your project

Whether you're extending an existing platform, modernising legacy code, or planning something new, our engineers can help. Tell us what you're working on and we'll explore a practical technical solution together.