{"id":509,"date":"2026-09-28T08:15:00","date_gmt":"2026-09-28T06:15:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/?page_id=509"},"modified":"2026-11-15T12:06:18","modified_gmt":"2026-11-15T11:06:18","slug":"speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/","title":{"rendered":"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts"},"content":{"rendered":"<h2>Unnecessary files and page features<\/h2>\n<p>Some WordPress plugins load CSS or JavaScript on pages without the corresponding feature. Those files can add transfers, processing or render blocking. The effect depends on the actual assets and browser cache; a large script does not automatically create a large DOM or a poor INP score. The DOM is the browser\u2019s structured representation of page elements, such as headings, links and form fields.<\/p>\n<p><strong>Selective dequeuing<\/strong> removes a named asset from the loading queue for a particular request. The name, called a <em>handle<\/em>, is supplied by the registering code. The useful question is not simply \u201cIs this a shop page?\u201d but \u201cDoes any feature on this complete page require this asset?\u201d<\/p>\n<figure class=\"lw-diagram\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/dia-509-dequeue-20261024.png?v=20261115\" width=\"1120\" height=\"580\" alt=\"The complete page is audited before proven unnecessary handles are removed; functionality and measurements are then checked.\"><figcaption>The complete page is audited before proven unnecessary handles are removed; functionality and measurements are then checked.<\/figcaption><\/figure>\n<h2>1. Loaded assets and their dependencies<\/h2>\n<p>A staging copy should contain the same relevant theme, plugins and templates as production. Browser Network and Console panels establish which files are requested and whether features fail. The plugin source and WordPress registrations map file URLs to handles and dependency lists. A handle is an identifier, not necessarily the file name.<\/p>\n<p>The <code>WP_Scripts<\/code> and <code>WP_Styles<\/code> queues provide useful diagnostic snapshots. A queue dump is not a complete inventory of all delivered assets: dependencies can be resolved later, footer or block rendering can enqueue additional files, and already printed assets need separate consideration. Script modules also have a separate API. Temporary diagnostics belong in restricted staging logs and should be removed after the audit.<\/p>\n<h2>2. Dequeue and deregister are different<\/h2>\n<ul><li><code>wp_dequeue_script()<\/code> and <code>wp_dequeue_style()<\/code> remove the explicit queue entry. Registration remains available.<\/li><li><code>wp_deregister_script()<\/code> and <code>wp_deregister_style()<\/code> remove the registration. Required dependents can then fail to load or work correctly.<\/li><\/ul>\n<p>If an asset remains a registered dependency of another queued asset, dequeuing that dependency alone may not prevent loading. That is evidence of a dependency to investigate, not a reason to force removal with deregistration. Frontend deregistration has no general protection against broken features.<\/p>\n<p>Priority <code>100<\/code> runs after callbacks with lower priorities <em>on the same hook<\/em>. A later callback or another hook can still enqueue the asset. Removal after the HTML tag has already been printed cannot undo browser loading. The correct point follows the actual enqueue and output sequence.<\/p>\n<h2>3. A deliberately limited example<\/h2>\n<p>The following example belongs in a child theme\u2019s <code>functions.php<\/code> or a small site-specific plugin. A parent-theme update can replace edits to the parent theme. The example affects only explicitly audited singular pages or posts; the initial empty list changes nothing. An MU plugin requires the usual PHP file wrapper and deliberate maintenance.<\/p>\n<figure style=\"--cbb-digits:2\" class=\"cbb cbb--wrap cbb--numbers wp-block-code-beautifier-block-code\" data-lang=\"php\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">PHP<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" aria-label=\"Copy code\" data-cbb-status-done=\"Code copied to the clipboard.\" data-cbb-status-failed=\"Copying failed. The code is selected for copying with Ctrl+C or \u2318+C.\" data-cbb-status-noselect=\"Copying failed.\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code example: PHP\"><code class=\"cbb-code language-php\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-function\">add_action<\/span>( <span class=\"cbb-string\">'wp_enqueue_scripts'<\/span>, <span class=\"cbb-keyword\">function<\/span> () {\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">if<\/span> ( <span class=\"cbb-function\">is_admin<\/span>() || ! <span class=\"cbb-function\">is_singular<\/span>() ) {\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">return<\/span>;\n<\/span><span class=\"cbb-line\">    }\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-comment\">\/\/ Empty by default. Each entry requires a complete page audit.<\/span>\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-comment\">\/\/ Structure: post ID =&gt; scripts and styles proven unnecessary.<\/span>\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-variable\">$audited_pages<\/span> = <span class=\"cbb-keyword\">array<\/span>();\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-variable\">$post_id<\/span> = <span class=\"cbb-type\">(int)<\/span> <span class=\"cbb-function\">get_queried_object_id<\/span>();\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">if<\/span> ( ! <span class=\"cbb-keyword\">isset<\/span>( <span class=\"cbb-variable\">$audited_pages<\/span>&#91; <span class=\"cbb-variable\">$post_id<\/span> &#93; ) ) {\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">return<\/span>;\n<\/span><span class=\"cbb-line\">    }\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-variable\">$assets<\/span> = <span class=\"cbb-variable\">$audited_pages<\/span>&#91; <span class=\"cbb-variable\">$post_id<\/span> &#93;;\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">foreach<\/span> ( <span class=\"cbb-variable\">$assets<\/span>&#91;<span class=\"cbb-string\">'scripts'<\/span>&#93; ?? <span class=\"cbb-keyword\">array<\/span>() <span class=\"cbb-keyword\">as<\/span> <span class=\"cbb-variable\">$handle<\/span> ) {\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-function\">wp_dequeue_script<\/span>( <span class=\"cbb-variable\">$handle<\/span> );\n<\/span><span class=\"cbb-line\">    }\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">foreach<\/span> ( <span class=\"cbb-variable\">$assets<\/span>&#91;<span class=\"cbb-string\">'styles'<\/span>&#93; ?? <span class=\"cbb-keyword\">array<\/span>() <span class=\"cbb-keyword\">as<\/span> <span class=\"cbb-variable\">$handle<\/span> ) {\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-function\">wp_dequeue_style<\/span>( <span class=\"cbb-variable\">$handle<\/span> );\n<\/span><span class=\"cbb-line\">    }\n<\/span><span class=\"cbb-line\">}, <span class=\"cbb-number\">100<\/span> );<\/span><\/code><\/pre><span class=\"cbb-status\" role=\"status\"><\/span><\/figure>\n<p>After a complete audit, an entry could have the shape <code>123 =&gt; array( 'scripts' =&gt; array( 'contact-form-7' ), 'styles' =&gt; array( 'contact-form-7' ) )<\/code>. The number is an illustrative post ID, not a recommendation for a real site. That entry is justified only if the complete rendered page has no form and no remaining dependency on those handles. Each translation needs its own verified ID. Archive pages stay unchanged.<\/p>\n<p>The example intentionally leaves registrations intact. It does not automatically inspect templates, resolve all dependencies, remove script modules or prevent later enqueue operations. Those boundaries require source inspection and a browser check. No WooCommerce-wide blocklist is included.<\/p>\n<h2>4. Why page-type shortcuts are insufficient<\/h2>\n<p>A mini-cart in the header, a product block in an article or an account feature can need commerce assets outside the main shop, cart and checkout routes. WooCommerce changed the default loading of cart fragments in version 7.8; the classic cart widget, dependencies or explicit enqueue calls can still request the script. A blanket claim that every plugin asset loads everywhere is incorrect.<\/p>\n<p>Forms can appear in a footer, widget, template, reusable content or translated page. A check for the slugs <code>contact<\/code> and <code>support<\/code> misses those locations. Checking only the current post\u2019s shortcode also misses content added elsewhere. Contact Form 7 documents native loading controls and explicit enqueue functions; using those controls still requires a complete inventory of form locations and correct timing.<\/p>\n<h2>5. Functionality tests before deployment<\/h2>\n<ol><li>A baseline uses the same route, viewport, device and cache conditions.<\/li><li>One reviewed rule is enabled in staging. The check confirms that the intended files disappear and required dependencies remain.<\/li><li>Tests cover forms, validation, navigation, account pages, add-to-cart, mini-cart and checkout wherever relevant, including every language and mobile layout. Styles, keyboard interaction and console errors are also checked.<\/li><li>The tests are repeated with logged-in and logged-out sessions and the relevant cache variants. Deployment needs a reversible change and cache invalidation; a production smoke test follows staging verification.<\/li><\/ol>\n<p>Transferred bytes, request counts and timings must be measured. No fixed saving, disappearance of every unused-code warning or ranking improvement follows automatically. TBT is a laboratory indicator of blocking work; INP measures interaction responsiveness and needs appropriate interaction or field data. Lower TBT does not prove better INP.<\/p>\n<div class=\"lw-faq\"><h2>Questions and answers<\/h2><h3>Why does a dequeued file still appear?<\/h3><p>A dependency, a later enqueue, another copy of the file or cached HTML can explain the request. The request initiator, dependency tree and callback order help identify the cause. Increasing the priority blindly does not establish correctness.<\/p><h3>Is an empty rule list useful?<\/h3><p>The empty list makes the example inert until site-specific evidence exists. A measured, reviewed rule is preferable to assuming that every non-shop page is asset-free. The example is a starting point for that rule, not a tested configuration for an arbitrary site.<\/p><h3>When is the audit repeated?<\/h3><p>Theme, plugin, form, template and translation changes can invalidate a previously correct rule. The affected page tests therefore belong alongside those changes.<\/p><\/div>\n<div class=\"lw-quellen\"><h2>Sources<\/h2><ul><li><a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress hooks<\/a><\/li><li><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/wp_dequeue_script\/\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress dequeue<\/a><\/li><li><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/wp_deregister_script\/\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress deregister<\/a><\/li><li><a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_dependencies\/all_deps\/\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress dependencies<\/a><\/li><li><a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/wp_enqueue_scripts\/\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress enqueue hook<\/a><\/li><li><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/wp_dequeue_script_module\/\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress script modules<\/a><\/li><li><a href=\"https:\/\/developer.woocommerce.com\/2023\/06\/16\/best-practices-for-the-use-of-the-cart-fragments-api\/\" target=\"_blank\" rel=\"noopener noreferrer\">WooCommerce: cart fragments<\/a><\/li><li><a href=\"https:\/\/contactform7.com\/loading-javascript-and-stylesheet-only-when-it-is-necessary\/\" target=\"_blank\" rel=\"noopener noreferrer\">Contact Form 7: conditional loading<\/a><\/li><li><a href=\"https:\/\/web.dev\/articles\/tbt\" target=\"_blank\" rel=\"noopener noreferrer\">web.dev: TBT and INP<\/a><\/li><\/ul><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Selective removal of unnecessary WordPress CSS and JavaScript from the loading queue. The example preserves registrations and requires a complete page audit, dependency checks and functional tests.<\/p>\n","protected":false},"author":1,"featured_media":33919,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92642],"tags":[91312,91093,91219,91315,91096],"class_list":["post-509","post","type-post","status-publish","format-standard","hentry","category-tutorials-en-wordpress-plugins-tricks","tag-javascript","tag-php","tag-tutorial","tag-web-performance","tag-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts | Lukas Wojcik<\/title>\n<meta name=\"description\" content=\"Selectively dequeue WordPress plugin assets: inspect script handles, hook priorities and page conditions, then check affected features.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"Selectively dequeue WordPress plugin assets: inspect script handles, hook priorities and page conditions, then check affected features.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-28T06:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-15T11:06:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll7-509-509.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts\",\"datePublished\":\"2026-09-28T06:15:00+00:00\",\"dateModified\":\"2026-11-15T11:06:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/\"},\"wordCount\":937,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll7-509-509.png\",\"keywords\":[\"JavaScript\",\"PHP\",\"Tutorial\",\"Web Performance\",\"WordPress\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/\",\"name\":\"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll7-509-509.png\",\"datePublished\":\"2026-09-28T06:15:00+00:00\",\"dateModified\":\"2026-11-15T11:06:18+00:00\",\"description\":\"Selectively dequeue WordPress plugin assets: inspect script handles, hook priorities and page conditions, then check affected features.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll7-509-509.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll7-509-509.png\",\"width\":1200,\"height\":630,\"caption\":\"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/wordpress-plugins-tricks\\\/tutorials-en-wordpress-plugins-tricks\\\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/de\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts | Lukas Wojcik","description":"Selectively dequeue WordPress plugin assets: inspect script handles, hook priorities and page conditions, then check affected features.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/","og_locale":"en_US","og_type":"article","og_title":"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts | Lukas Wojcik","og_description":"Selectively dequeue WordPress plugin assets: inspect script handles, hook priorities and page conditions, then check affected features.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-09-28T06:15:00+00:00","article_modified_time":"2026-11-15T11:06:18+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll7-509-509.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts","datePublished":"2026-09-28T06:15:00+00:00","dateModified":"2026-11-15T11:06:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/"},"wordCount":937,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll7-509-509.png","keywords":["JavaScript","PHP","Tutorial","Web Performance","WordPress"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/","name":"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll7-509-509.png","datePublished":"2026-09-28T06:15:00+00:00","dateModified":"2026-11-15T11:06:18+00:00","description":"Selectively dequeue WordPress plugin assets: inspect script handles, hook priorities and page conditions, then check affected features.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll7-509-509.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll7-509-509.png","width":1200,"height":630,"caption":"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/wordpress-plugins-tricks\/tutorials-en-wordpress-plugins-tricks\/speeding-up-wordpress-selectively-disabling-unnecessary-plugin-scripts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/de\/"},{"@type":"ListItem","position":2,"name":"Speeding Up WordPress: Selectively Disabling Unnecessary Plugin Scripts"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=509"}],"version-history":[{"count":9,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/509\/revisions"}],"predecessor-version":[{"id":26493,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/509\/revisions\/26493"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/33919"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}