Why jquery-migrate.min.js Is No Longer Needed

Many developers use the jQuery library for their routine tasks in WordPress. This library has regular updates and new versions. Each version has features with a different implementation. There were times when developers worked in several versions on one website. And the linker was the jquery-migrate.min.js file. But now many users wonder how to disable jquery-migrate.min.js in WordPress.

But why the file that used to be so essential is no longer needed and should be disabled?

It happened because WordPress started using a new jQuery release by default. And jquery-migrate.min.js now is a waste of space that negatively affects the website performance.

How To Disable jquery-migrate.min.js In WordPress

We can provide you with multiple solutions. You can disable jquery-migrate.min.js in WordPress with a plugin or using code. Both ways are equally effective, and we will talk about it below. However, the final decision is up to you.

Disable jquery-migrate.min.js In WordPress With A Plugin

We recommend our plugin Clearfy. Download and install it. Then go to plugin settings.

Here’s a step-by-step instruction.

Open admin dashboard. Go to Settings => Clearfy menu => Performance.

How To Disable jquery-migrate.min.js In WordPress

Find Remove jQuery Migrate and click ON. Save the changes.

Disable jquery-migrate.min.js In WordPress Using Code

If for some reasons the first option doesn’t suit your needs, try to use code. Just add the following lines to your theme’s functions.php:

function isa_remove_jquery_migrate( &$scripts ) { if( !is_admin() ) { $scripts->remove( 'jquery' ); $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.12.4' ); } } add_filter( 'wp_default_scripts', 'isa_remove_jquery_migrate' );

Now you’ve successfully disabled jQuery Migrate.

Conclusion

The final choice is up to you. However, keep in mind that changing the code can cause negative side effects for the whole website. If you choose Clearfy then disabling unwanted scripts will be 100% successful. When you’ve managed to disable jquery-migrate.min.js in WordPress, be ready for compatibility issues with the “old” plugins and themes that missed at least 3 important updates. The following warning will indicate the outdated plugins:

How To Disable jquery-migrate.min.js In WordPress

You can learn more about Clearfy incompatibility risks from the red icon with ‘?’.

How To Disable jquery-migrate.min.js In WordPress

If you want to undo this action and don’t disable jquery-migrate.min.js in WordPress just press OFF next to Remove jQuery Migrate.

Scroll to Top