Beginner's Guide for WordPress / Start your WordPress Blog in minutes

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

Would you like to remove the login shake effect in WordPress?

When you enter the wrong username or password when logging into WordPress, the login box shakes when the error message is displayed. Some users find the shaking effect distracting.

In this article, we’ll show you how to remove the login shake effect in WordPress.

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 letting 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 website.

Removing the login shake effect is a decision based on personal preference. In our opinion, it helps get users’ attention and let them know that there is a login error. 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.

This means that you need to add code to your theme files. If this is your first time adding code to your WordPress files, then you should check out our beginner’s guide on how to copy and paste code snippets in WordPress.

Simply add the following code to your theme’s functions.php file or a site-specific plugin:

function wpb_remove_loginshake() {
    remove_action('login_footer', 'wp_shake_js', 12);
}
add_action('login_footer', 'wpb_remove_loginshake');
Add This Code Snippet

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

We hope this article helped you remove the login shake effect in WordPress. You may also want to learn how to speed up your WordPress performance, or check out our list of the 50 most common WordPress errors and how to fix them.

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.

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.