How to Customize the WordPress Login Page
The WordPress login page is the first thing clients see every time they work on their site, and by default it shows the WordPress logo on a gray background. A branded login page makes the site feel like theirs, and moving the login URL cuts down the bots hammering it.
The code way
WordPress lets you style the login page through the login_enqueue_scripts hook and change the logo link with filters:
add_action( 'login_enqueue_scripts', function () {
?>
<style>
body.login { background: #0f172a; }
#login h1 a {
background-image: url('<?php echo esc_url( get_stylesheet_directory_uri() . '/logo.svg' ); ?>');
background-size: contain;
width: 200px;
height: 60px;
}
.login form { border-radius: 12px; }
.wp-core-ui .button-primary { background: #4f46e5; border-color: #4f46e5; }
</style>
<?php
} );
add_filter( 'login_headerurl', fn () => home_url( '/' ) ); // logo links to your site
add_filter( 'login_headertext', fn () => get_bloginfo( 'name' ) ); // accessible label
It works; each change after that is another trip into the code.
The settings way: WP Admin Cleaner
WP Admin Cleaner has a login page designer:
- Colors: text, background, form background and button style.
- Background image with an adjustable overlay for readable text.
- Logo and its size. Since version 1.7.0 the uploaded logo is used in the admin top bar too.
- Ready-made themes such as Plain Light and Plain Dark as a starting point.
- Custom CSS for anything else. Use your browser’s Inspect tool to find the selector you want to change.
Move the login URL
Bots try wp-login.php on every WordPress site. WP Admin Cleaner’s login security option changes the login address (to /login/ by default, or anything you choose). Requests to the old login URL get a 404, so automated login attempts hit nothing. Tell your team the new address, and bookmark it.
Moving the login URL reduces noise from bots; it doesn’t replace strong passwords, two-factor authentication and keeping WordPress updated.
Want a friendly start page after login as well? See how to build a custom WordPress dashboard for clients.
