Change WordPress Login Logo without Plugin

Help others by sharing this article

I bet you’re here because you’re looking for a snippet of code that will help you change WordPress login logo without plugin. WordPress lets you do it without any trouble—but if you want to change the logo, it’s not immediately obvious how to do so.

The first thing to know is that WordPress does not use a CSS background image for the logo. The only way to change the logo is by editing your theme’s functions.php file or installing a code snippet plugin (optional).

Why should change WordPress login logo

WordPress is used by millions of people around the world, and many of those users think that their first step in customizing their website is to change their login logo.

Your website’s login page is the only part of your site that non-registered users see. This makes it a great opportunity for branding if you have partners or clients who use the login page regularly.

You can also change your WordPress login logo to add a sense of security. This is because hackers often create fake versions of popular websites’ login pages in order to steal their visitors’ credentials. So it’s important that your users can tell that they’re on your legitimate site, not an imposter.

We recommend changing your WordPress login logo to something unique so visitors know they’re on the right site, not a fake version created by hackers.

wpamit how to change wordpress login page logo without plugin by using snipppet

Also check, Change WordPress Admin Dashboard Footer Text without plugin.

Here’s what you need to do to change WordPress admin login page logo:

While there are many different ways to do this, two of them are the most common methods. The first is using a plugin and the second is using a code or snippet. If you want to do this customization by using a plugin, then we recommend you to use Custom Login Page Customizer plugin by Colorlib.

While plugins do serve an important purpose on WordPress, they should generally be avoided when possible due to their tendency to slow down websites.

Instead of using a plugin, we recommend using a simple code snippet.

My Recommendations to change WordPress login logo programmatically.

Take a full backup of your website before making any changes to function.php.

Be careful while editing the functions.php file. You can also use any code snippet plugin to run this customization on your site without editing the functions.php file directly. We recommend this Free Code Snippet Plugin.

It is recommended to create a child theme and do this customization with your child theme. You can Create a child theme with this free plugin (after creating the child theme you can delete the plugin) . If you do not use child theme, It may be deleted or overwritten once the theme developer updates the main theme.

Follow the steps to change the WordPress admin login logo using snippet

1). Login to your WordPress admin area. Then Got to Appearence>Theme File Editor.

how to change wordpress login page logo 2
Access Theme File Editor

2). Select the current theme if it is already not selected.

how to change wordpress login page logo

3). Select the functions.php file.

how to change wordpress login page logo 4

4). Add the below code to functions.php:

//change wordpress login page logo using snippet of code
add_action( 'login_enqueue_scripts', 'wpamit_login_logo_change' );
function wpamit_login_logo_change() {
    <style type="text/css">
        #login h1 a, .login h1 a {
           background-image: url(wp-content/uploads/2022/03/wpamit-logo-200px.svg);
           height: auto;
           width: 200px;
           background-size: contain;
           background-repeat: no-repeat;
           background-color: transparent;

5). Change values before clicking on ‘update file’

You need to change the highlighted values in the above code before clicking on ‘update file’.
First, change the background image URL with your image/logo by replacing the highlighted URL with your image URL.
Second, you can provide your required image height and width by just replacing the highlighted height and width values.

After adding the snipped code, It should look like the below image:

how to change wordpress login page logo 3a

Hope this article helped you to understand how to change WordPress login logo without any plugin. If you need any assistance or are stuck anywhere, please do not hesitate to comment below. I will be happy to help you.

Help others by sharing this article

Leave a Reply

Your email address will not be published. Required fields are marked *