How to remove jQuery Migrate from WordPress? illustrations

JQuery Migrate greatly simplifies the process of moving legacy jQuery code to a higher jQuery version by identifying features that are not recommended. It then restores the deprecated functionality and behavior so that the old code still works properly on the current jQuery version and later. Most of

‘s latest front-end code and plug-ins do not require jquery-migrate.min.js. In most cases, this will only add unnecessary load to your site. If you start, you can see that it is running the Chrome development tools console.

to delete jQuery Migrate:

  • is better to keep your code, themes, and plug-ins updated than to patch support for additional files. Keeping your website up to date can also protect it from security attacks.
  • if you are running plug-ins that use old jQuery code, it is best to update them or switch to an alternative that keeps them updated. How does

remove jQuery Migrate from WordPress?

is very simple to remove jQuery Migrate from WordPress. You only need to add the following lines of code to the themefunctions.phpfile. Another easiest way for

//Remove JQuery migrate
function remove_jquery_migrate( $scripts ) {
if ( ! is_admin() && isset( $scripts->registered['jquery'] ) ) {
$script = $scripts->registered['jquery'];
if ( $script->deps ) { 
// Check whether the script has any dependencies
$script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) );
}
}
}
add_action( 'wp_default_scripts', 'remove_jquery_migrate' );

to disable it is to add a plug-in called Remove jQuery Migrate.

uses the WP Rocket plug-in to remove the jQuery Migrate

WP Rocket plug-in with built-in functionality that removes the jQuery Migrate with a single click.

to delete jQuery Migrate using WP Rocket, go to the setting of the WP Rocket plug-in & gt;> FILE OPTIMZATION.

How to remove jQuery Migrate from WordPress? illustrations1

uses the WP Rocket cache plug-in to delete jQuery Migrate

under the JavaScript Files section, you can select the Remove jQuery Migrate check box. okay.

reference: use the WP Rocket plug-in to speed up your WordPress site.

uses the plug-in Remove jQuery Migrate to remove jQuery Migrate:

Remove jQuery Migrate this plug-in removes the jQuery Migrate script from the front end of the site (note: the plug-in has not been updated for a long time).

go to dashboard: log in to your WordPress site to open the dashboard.

go to plug-ins: you will see the plug-in menu on the left menu bar. Click it to expand more options, click add New.

as shown in the figure, search for Remove jQuery Migrate in the search bar.

How to remove jQuery Migrate from WordPress? illustrations2

search installation plug-in

How to remove jQuery Migrate from WordPress? illustrations3

Click to install the

activation plug-in now, that’s it. The plug-in will do the rest of your work.

this is the most commonly used plug-in recommended by most developers. You can also select other plug-ins available.

as I mentioned above, jQuery migrate adds unnecessary load to your site. Therefore, I recommend removing it from your website or blog.

Disclaimer: All articles on this website, unless otherwise specified or marked, are original and published on this website. Any individual or organization is prohibited from copying, stealing, collecting, or publishing the content of this site to any website, book, or other media platform without the consent of this site. If the content on this website infringes on the legitimate rights and interests of the original author, you can contact us for assistance.