Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Remove the Login Shake Effect in WordPress (Updated)

WordPress automatically adds a shake animation to the login form whenever someone enters the wrong credentials.

While this feature was designed to be helpful, many site owners find it creates a jarring experience and prefer something more subtle and professional instead.

If you’re looking to create a more polished login experience, then removing the shake effect is one of those small touches that can make a big difference.

It’s especially popular among business owners and membership site creators who want their login process to feel as refined as the rest of their site experience.

Here’s the great news: you don’t need to be a developer to make this change. We’ll walk you through the easiest way to disable the login shake effect, step by step.

How to Remove the Login Shake Effect in WordPress (Updated)

What Is the WordPress Login Shake Effect?

If you make a mistake when trying to log in to your WordPress website, then the login box will shake, and an error message will be displayed.

This lets you know that the username or password you entered is incorrect.

The Login Box Will Shake and an Error Message Will Be Displayed

This is designed to alert the user so they notice that the login was unsuccessful.

However, some users may find it annoying or unprofessional, or want to reduce unnecessary animation scripts on their websites.

Removing the login shake effect is a decision based on personal preference. In our opinion, it helps get users’ attention and lets them know that there is a login error. That’s why on our sites, we do not remove the login shake effect.

With that being said, let’s look at how to remove the login shake effect in WordPress

How to Remove the Login Shake Effect in WordPress

The login shake feature is added with a JavaScript file that WordPress includes with every login page. All we need to do to disable the effect is remove the JavaScript.

The safest and easiest way to do that is with the WPCode plugin since it already includes a script to remove the login shake effect in its snippet library.

We have thoroughly tested the tool and have found it to be the safest and easiest way to add custom code to your website. If you want to learn more about our experience, you can take a look at our detailed WPCode review.

First, you need to install the WPCode free plugin. If you need help, then you can see our step-by-step guide on how to install a WordPress plugin.

Note: WPCode has a free plan that you can use for this tutorial. However, upgrading to the pro plan will give you access to features like a cloud library of code snippets, smart conditional logic, block snippets, and more.

Upon activation, you can navigate to the Code Snippets » + Add Snippet page.

Once there, you can use the plugin’s search feature to find the ‘Remove Login Shake Animation’ snippet.

Selecting the Remove Login Shake Animation Snippet in WPCode

Next, when you hover your mouse over the snippet, you will see a ‘Use snippet’ button. Clicking that button will open a new window where the snippet is already set up for you.

All you need to do is toggle the ‘Active’ button on and then click the ‘Update’ button.

Activating the Snippet in WPCode

Alternatively, advanced users can copy and paste the code snippet manually.

Simply add this code to your theme’s functions.php file:

function wpb_remove_loginshake() {
    remove_action('login_footer', 'wp_shake_js', 12);
}
add_action('login_footer', 'wpb_remove_loginshake');

Once you have saved the file or activated the snippet, the login shake effect will be disabled.

Frequently Asked Questions About the WordPress Login Shake Effect

Here are some questions that are frequently asked by our readers about the WordPress login shake effect:

Why would someone want to remove the login shake effect?

If you’re building a custom login page or managing a client site, the shake effect can feel unpolished or unwanted.

Some brands prefer a simpler login flow with less animation or visual noise. Removing it can make the login page feel smoother and more refined.

Also, if you’re optimizing performance or auditing unused scripts, removing unnecessary JavaScript (like wp_shake_js) can help streamline your page. Even though it’s just a small script, every bit counts for speed and load time.

Will the snippet to remove the login shake effect work with all versions of WordPress?

Most modern WordPress versions (5.0 and above) use the login_footer hook to attach the JavaScript responsible for the shake effect.

If you come across an older tutorial using the login_head hook instead, then that method might not work properly on updated installations.

To avoid compatibility issues, make sure you’re using the right hook for your version. It’s also a good idea to test the change in a staging environment or with debug mode enabled.

Some themes or login customization plugins may reintroduce animations or override your snippet, so always confirm the effect is fully removed after applying it.

Can I undo the change later if I want to bring back the login shake effect?

Yes, the customization is completely reversible. Whether you used a plugin like WPCode to insert the snippet or manually added it to your functions.php file, you can remove it at any time.

Just deactivate or delete the snippet, then clear any caches to make sure changes reflect on the login page.

This gives you flexibility to experiment without risk. If you later install a custom login plugin or decide you prefer the shake animation after all, WordPress will automatically revert to showing it when login errors occur—as long as the removal code is no longer active.

Expert Guides on WordPress Login

We hope this article helped you remove the login shake effect in WordPress.

You may also want to see some other articles related to the WordPress login page:

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

1 CommentLeave a Reply

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.