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

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

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

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

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

In this article, we will 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 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. 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.

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.

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.

Expert Guides on WordPress Login

Now that you know how to remove the login shake effect, you may like to see some other articles related to the WordPress login page.

We hope this article helped you remove the login shake effect in WordPress. You may also want to see our guide on how to speed up your WordPress performance or our expert list of the 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. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

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

2 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

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.