Learn how to customize WordPress login screen with simple code tweaks to add custom backgrounds, logos, styling, and URL changes for a branded login experience.
WordPress does not offer any native capability of customizing the looks of the theme. In particular, this means that the website administrators do not have any built-in way of adding the brand’s logo or styling to the login area of the website.
In this tutorial, I will show you how to make changes to the functions.php so that the website could have a customized login page.

Customizing the WordPress Login Page
Customizing the WordPress login page allows you to align the login experience with your brand identity. This process involves making a few targeted changes using custom CSS and small PHP snippets.
The typical customizations include:
- Adding a custom background image
- Replacing the default WordPress logo with your brand logo
- Styling the login form fields and labels
- Changing the login logo URL
- Removing the login page “shake” effect

It’s important to note that the WordPress login page is not part of the active theme layout. Because of this, WordPress does not automatically load your theme’s stylesheet on the login screen.
To apply custom styles, you need to create and load a dedicated stylesheet specifically for the login page.
Inside your active theme folder, create a new directory called 'login'.
Inside this folder, create a file named 'custom-login-styles.css'.
Next, open your theme’s 'functions.php' file and add the following code to load the custom stylesheet on the login page:
[php]
function my_custom_login_styles() {
echo '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/login/custom-login-styles.css" />';
}
add_action('login_head', 'my_custom_login_styles');
[/php]
Add Custom Background
To apply a background image to the login page, add the following code to 'custom-login-styles.css':
[css]
body.login {
background-image: url('/online.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
background-size: cover;
}
[/css]
Replace the WordPress Logo With a Custom Logo
To replace the default WordPress logo with your own branding, add this code:
[css]
.login h1 a {
background-image: url('/hdr-logo.png');
background-size: contain;
width: 100%;
}
[/css]
Customize the Looks of the Login Form

You can easily style the labels and input fields to match your site’s design:
[css]
.login label {
font-size: 12px;
color: #555555;
}
.login input[type="text"],
.login input[type="password"] {
background-color: #efefef;
border-color: #000000;
}
[/css]
Change the Login Logo URL
By default, the WordPress login logo links to wordpress.org. You can change this so it points to your site’s homepage by adding the following code to 'functions.php':
[php]
function my_login_logo_url() {
return home_url();
}
add_filter('login_headerurl', 'my_login_logo_url');
function my_login_logo_title() {
return 'Your Site Name';
}
add_filter('login_headertitle', 'my_login_logo_title');
[/php]
With these changes in place, your WordPress login screen will reflect your brand and provide a more polished, professional experience for users.
Wrapping Up
Customizing your WordPress login screen is an easy way to make your site look more professional and match your brand’s identity. The default WordPress login page doesn’t let you change its look out of the box, so adding custom backgrounds, logos, and form styles helps your website stand out.
- Add a custom background that reflects your site’s theme
- Swap the default WordPress logo for your own logo
- Style the login form fields and buttons with your brand colors
- Change the login logo URL to point to your homepage
Whether you’re improving user experience or reinforcing brand consistency, customizing the WordPress login screen gives visitors a polished first impression.