{"id":6366,"date":"2016-09-02T16:45:13","date_gmt":"2016-09-02T23:45:13","guid":{"rendered":"https:\/\/kinsta.com\/?post_type=knowledgebase&#038;p=6366"},"modified":"2026-03-18T17:34:25","modified_gmt":"2026-03-18T17:34:25","slug":"remove-query-strings-static-resources","status":"publish","type":"post","link":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/","title":{"rendered":"How to Remove Query Strings from Static Resources in WordPress"},"content":{"rendered":"<p>When it comes to WordPress performance, this question comes up quite a bit, and that\u00a0is how to remove query strings from static resources. <a href=\"https:\/\/kinsta.com\/blog\/wordpress-css\/\" target=\"_blank\" rel=\"noopener noreferrer\">Your CSS<\/a> and JavaScript files usually have the file version on the end of their URLs, such as <code>domain.com\/style<strong>.css?ver=4.6<\/strong><\/code>. Some servers and proxy servers are unable to cache query strings, even if a <code>cache-control:public<\/code> header is present.<\/p>\n<p>By removing them, you can sometimes improve your caching. This will also fix that warning you might see in\u00a0<a href=\"https:\/\/kinsta.com\/blog\/gtmetrix-speed-test\/\" target=\"_blank\" rel=\"noopener noreferrer\">GTMetrix<\/a>\u00a0and\u00a0<a href=\"https:\/\/kinsta.com\/blog\/pingdom-speed-test\/\" target=\"_blank\" rel=\"noopener noreferrer\">Pingdom<\/a> and called &#8220;Remove query strings from static resources.&#8221;<\/p>\n<figure id=\"attachment_40351\" aria-describedby=\"caption-attachment-40351\" style=\"width: 1908px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40351\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-2.png\" alt=\"Remove query strings from static resources\" width=\"1908\" height=\"624\" srcset=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-2.png 1908w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-2-300x98.png 300w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-2-1024x335.png 1024w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-2-768x251.png 768w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-2-1536x502.png 1536w\" sizes=\"auto, (max-width: 1908px) 100vw, 1908px\" \/><figcaption id=\"caption-attachment-40351\" class=\"wp-caption-text\">Remove query strings from static resources<\/figcaption><\/figure>\n<p>Please keep in mind that <strong>query strings are usually there for a reason<\/strong>.\u00a0Versioning on files is used by WordPress developers to get around caching problems.\u00a0For example, if they push out an update and change <code>style.css<\/code> from <code>?ver=4.6<\/code> to <code>?ver=4.7<\/code>, it will be treated as a completely new URL and won&#8217;t be cached. If you remove the query strings and update a plugin, this could result in the cached version to continue serving. In some cases, this could break the front-end of your site until the cached resource expires or the cache is completely flushed.<\/p>\n<p>Query strings also used for organization\u00a0in development workflows.<\/p>\n<h2>Remove Query\u00a0Strings from Static Resources<\/h2>\n<p>There are a couple different ways you can remove query strings, one is with a little code and another is with a WordPress plugin. If you are using a CDN to deliver your assets, this might not be required as some CDN providers actually have the ability to cache query strings. Check with both your web host and CDN provider prior to implementing the following to see if they can cache query strings. The <a href=\"https:\/\/kinsta.com\/docs\/wordpress-hosting\/wordpress-cdn\/kinsta-cdn\/#kinstas-cdn\" target=\"_blank\" rel=\"noopener noreferrer\">Kinsta CDN<\/a> does cache query strings.<\/p>\n<ol>\n<li><a href=\"#remove-query-string-code\">Remove Query String from Static Resources with Code<\/a><\/li>\n<li><a href=\"#remove-query-string-plugin\">Remove Query String from Static Resources with a Plugin<\/a><\/li>\n<\/ol>\n<h3 id=\"remove-query-string-code\">1. Remove Query Strings from Static Resources with Code<\/h3>\n<p>You can easily remove query strings from your assets with a few lines of code. After making a <a href=\"https:\/\/kinsta.com\/docs\/wordpress-hosting\/wordpress-backups\/#wordpress-backups\">backup of your site<\/a>, create a <a href=\"https:\/\/kinsta.com\/blog\/wordpress-child-theme\">child theme<\/a> and add the following to your child theme&#8217;s <code>functions.php<\/code> file.<\/p>\n<pre><code class=\"language-php\">function remove_query_strings() {\n   if(!is_admin()) {\n       add_filter('script_loader_src', 'remove_query_strings_split', 15);\n       add_filter('style_loader_src', 'remove_query_strings_split', 15);\n   }\n}\n\nfunction remove_query_strings_split($src){\n   $output = preg_split(\"\/(&ver|\\?ver)\/\", $src);\n   return $output[0];\n}\nadd_action('init', 'remove_query_strings');<\/code><\/pre>\n<p><strong>Important:<\/strong>\u00a0Editing the source code of a WordPress theme\u00a0could break your site if not done correctly. If you aren&#8217;t comfortable doing this, please check with a developer first. Or, you could also take advantage of the free <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noopener noreferrer\">Code Snippets plugin<\/a>. This plugin will allow you to add the above code without having to worry if it will take your site down.<\/p>\n<p>Simply create a new snippet and add the above code. Select &#8220;Only run on site front-end&#8221; and then save the snippet. Your query strings will then be gone! You might need to clear the cache on your WordPress site to see the changes take effect on the front-end.<\/p>\n<figure id=\"attachment_40352\" aria-describedby=\"caption-attachment-40352\" style=\"width: 1548px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40352\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-code-snippet.png\" alt=\"Remove query strings code snippet\" width=\"1548\" height=\"928\" srcset=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-code-snippet.png 1548w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-code-snippet-300x180.png 300w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-code-snippet-1024x614.png 1024w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-code-snippet-768x460.png 768w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-code-snippet-1536x921.png 1536w\" sizes=\"auto, (max-width: 1548px) 100vw, 1548px\" \/><figcaption id=\"caption-attachment-40352\" class=\"wp-caption-text\">Remove query strings code snippet<\/figcaption><\/figure>\n<h4>With Query Strings (Before Code)<\/h4>\n<p>Here is an example of scripts loading with query strings.<\/p>\n<figure id=\"attachment_40353\" aria-describedby=\"caption-attachment-40353\" style=\"width: 1474px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40353\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/query-strings.png\" alt=\"Requests with query strings\" width=\"1474\" height=\"636\" srcset=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/query-strings.png 1474w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/query-strings-300x129.png 300w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/query-strings-1024x442.png 1024w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/query-strings-768x331.png 768w\" sizes=\"auto, (max-width: 1474px) 100vw, 1474px\" \/><figcaption id=\"caption-attachment-40353\" class=\"wp-caption-text\">Requests with query strings<\/figcaption><\/figure>\n<h4>Without Query Strings (After Code)<\/h4>\n<p>Here is an example of scripts after having removed query strings.<\/p>\n<figure id=\"attachment_40354\" aria-describedby=\"caption-attachment-40354\" style=\"width: 1466px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40354\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/no-query-strings.png\" alt=\"Requests without query strings\" width=\"1466\" height=\"640\" srcset=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/no-query-strings.png 1466w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/no-query-strings-300x131.png 300w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/no-query-strings-1024x447.png 1024w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/no-query-strings-768x335.png 768w\" sizes=\"auto, (max-width: 1466px) 100vw, 1466px\" \/><figcaption id=\"caption-attachment-40354\" class=\"wp-caption-text\">Requests without query strings<\/figcaption><\/figure>\n<h3 id=\"remove-query-string-plugin\">2. Remove Query String from Static Resources with a Plugin<\/h3>\n<p>An alternative to using code is to use a WordPress performance plugin that has this feature built in. The premium <a href=\"https:\/\/perfmatters.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Perfmatters<\/a> plugin (developed by a team member at Kinsta), allows you to remove query strings from static resources with a click of a button. It also enables you to easily implement other optimizations for your WordPress site, and works alongside your current caching plugin.<\/p>\n<figure id=\"attachment_40355\" aria-describedby=\"caption-attachment-40355\" style=\"width: 1476px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40355\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/perfmatters-remove-query-strings-1.png\" alt=\"Remove query strings with Perfmatters plugin\" width=\"1476\" height=\"956\" srcset=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/perfmatters-remove-query-strings-1.png 1476w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/perfmatters-remove-query-strings-1-300x194.png 300w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/perfmatters-remove-query-strings-1-1024x663.png 1024w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/perfmatters-remove-query-strings-1-768x497.png 768w\" sizes=\"auto, (max-width: 1476px) 100vw, 1476px\" \/><figcaption id=\"caption-attachment-40355\" class=\"wp-caption-text\">Remove query strings with Perfmatters plugin<\/figcaption><\/figure>\n<h2>No More Query Strings<\/h2>\n<p>After using either of the above options you should no longer see a warning about query strings in website speed test tools such as GTMetrix or Pingdom.<\/p>\n<figure id=\"attachment_40356\" aria-describedby=\"caption-attachment-40356\" style=\"width: 1882px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40356\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-warning-1.png\" alt=\"Fixed remove query strings from static resources warning\" width=\"1882\" height=\"256\" srcset=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-warning-1.png 1882w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-warning-1-300x41.png 300w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-warning-1-1024x139.png 1024w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-warning-1-768x104.png 768w, https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-from-static-resources-warning-1-1536x209.png 1536w\" sizes=\"auto, (max-width: 1882px) 100vw, 1882px\" \/><figcaption id=\"caption-attachment-40356\" class=\"wp-caption-text\">Fixed remove query strings from static resources warning<\/figcaption><\/figure>\n<p>Host your Static site for free with <a href=\"https:\/\/sevalla.com\/static-site-hosting\/\">Kinsta&#8217;s Static site hosting<\/a> and deploy your website directly to the edge.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When it comes to WordPress performance, this question comes up quite a bit, and that\u00a0is how to remove query strings from static resources. Your CSS and &#8230;<\/p>\n","protected":false},"author":38,"featured_media":41059,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wl_entities_gutenberg":"","_kinsta_gated_content":false,"_kinsta_gated_content_redirect":"","footnotes":""},"tags":[443,408],"topic":[22017],"wl_entity_type":[20901],"class_list":["post-6366","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-webdev","tag-webperf","topic-wordpress-tips","wl_entity_type-article"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.6 (Yoast SEO v24.6) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Remove Query Strings from Static Resources in WordPress<\/title>\n<meta name=\"description\" content=\"Not every server or CDN can cache query strings. Follow this tutorial on how to remove query strings from static resources in WordPress and improve speed.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Remove Query Strings from Static Resources in WordPress\" \/>\n<meta property=\"og:description\" content=\"Not every server or CDN can cache query strings. Follow this tutorial on how to remove query strings from static resources in WordPress and improve speed.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/\" \/>\n<meta property=\"og:site_name\" content=\"Kinsta\u00ae\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/kinstahosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fm.brianleejackson\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-02T23:45:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-18T17:34:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1460\" \/>\n\t<meta property=\"og:image:height\" content=\"730\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Brian Jackson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"Not every server or CDN can cache query strings. Follow this tutorial on how to remove query strings from static resources in WordPress and improve speed.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png\" \/>\n<meta name=\"twitter:creator\" content=\"@brianleejackson\" \/>\n<meta name=\"twitter:site\" content=\"@kinsta\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brian Jackson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/\"},\"author\":{\"name\":\"Brian Jackson\",\"@id\":\"https:\/\/kinsta.com\/#\/schema\/person\/079824c00ccc2b7141504f27ea63bef7\"},\"headline\":\"How to Remove Query Strings from Static Resources in WordPress\",\"datePublished\":\"2016-09-02T23:45:13+00:00\",\"dateModified\":\"2026-03-18T17:34:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/\"},\"wordCount\":690,\"publisher\":{\"@id\":\"https:\/\/kinsta.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png\",\"keywords\":[\"webdev\",\"webperf\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/\",\"url\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/\",\"name\":\"How to Remove Query Strings from Static Resources in WordPress\",\"isPartOf\":{\"@id\":\"https:\/\/kinsta.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png\",\"datePublished\":\"2016-09-02T23:45:13+00:00\",\"dateModified\":\"2026-03-18T17:34:25+00:00\",\"description\":\"Not every server or CDN can cache query strings. Follow this tutorial on how to remove query strings from static resources in WordPress and improve speed.\",\"breadcrumb\":{\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#primaryimage\",\"url\":\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png\",\"contentUrl\":\"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png\",\"width\":1460,\"height\":730,\"caption\":\"Remove query strings from static resources\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/kinsta.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress Tips\",\"item\":\"https:\/\/kinsta.com\/topic\/wordpress-tips\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Remove Query Strings from Static Resources in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kinsta.com\/#website\",\"url\":\"https:\/\/kinsta.com\/\",\"name\":\"Kinsta\u00ae\",\"description\":\"Kinsta: Simply better hosting.\",\"publisher\":{\"@id\":\"https:\/\/kinsta.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kinsta.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kinsta.com\/#organization\",\"name\":\"Kinsta\",\"alternateName\":\"Kinsta Inc, Kinsta Ltd\",\"url\":\"https:\/\/kinsta.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kinsta.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kinsta.com\/wp-content\/uploads\/2023\/12\/kinsta-logo.jpeg\",\"contentUrl\":\"https:\/\/kinsta.com\/wp-content\/uploads\/2023\/12\/kinsta-logo.jpeg\",\"width\":500,\"height\":500,\"caption\":\"Kinsta\"},\"image\":{\"@id\":\"https:\/\/kinsta.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/kinstahosting\",\"https:\/\/x.com\/kinsta\",\"https:\/\/www.instagram.com\/kinstahosting\/\",\"https:\/\/www.linkedin.com\/company\/kinsta\/\",\"https:\/\/www.pinterest.com\/kinstahosting\/\",\"https:\/\/www.youtube.com\/Kinsta\",\"https:\/\/www.crunchbase.com\/organization\/kinsta-wordpress-hosting\",\"https:\/\/www.wikidata.org\/wiki\/Q106594994\"],\"description\":\"Kinsta: Simply better hosting for WordPress. Fast, secure, scalable, and backed by world-class support. Built to power your growth.\",\"email\":\"contact@kinsta.com\",\"telephone\":\"+1 (888) 610-2915\",\"legalName\":\"Kinsta Inc.\",\"foundingDate\":\"2013-12-01\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"201\",\"maxValue\":\"500\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kinsta.com\/#\/schema\/person\/079824c00ccc2b7141504f27ea63bef7\",\"name\":\"Brian Jackson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kinsta.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/79623d815f4ed4c8c2457392d728cb16?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/79623d815f4ed4c8c2457392d728cb16?s=96&d=mm&r=g\",\"caption\":\"Brian Jackson\"},\"description\":\"Brian has a huge passion for WordPress, has been using it for over a decade, and even develops a couple of premium plugins. Brian enjoys blogging, movies, and hiking. Connect with Brian on Twitter.\",\"sameAs\":[\"https:\/\/www.facebook.com\/fm.brianleejackson\",\"https:\/\/www.linkedin.com\/in\/brianleejackson\",\"https:\/\/x.com\/brianleejackson\"],\"url\":\"https:\/\/kinsta.com\/blog\/author\/brianjackson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Remove Query Strings from Static Resources in WordPress","description":"Not every server or CDN can cache query strings. Follow this tutorial on how to remove query strings from static resources in WordPress and improve speed.","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:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/","og_locale":"en_US","og_type":"article","og_title":"How to Remove Query Strings from Static Resources in WordPress","og_description":"Not every server or CDN can cache query strings. Follow this tutorial on how to remove query strings from static resources in WordPress and improve speed.","og_url":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/","og_site_name":"Kinsta\u00ae","article_publisher":"https:\/\/www.facebook.com\/kinstahosting","article_author":"https:\/\/www.facebook.com\/fm.brianleejackson","article_published_time":"2016-09-02T23:45:13+00:00","article_modified_time":"2026-03-18T17:34:25+00:00","og_image":[{"width":1460,"height":730,"url":"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png","type":"image\/png"}],"author":"Brian Jackson","twitter_card":"summary_large_image","twitter_description":"Not every server or CDN can cache query strings. Follow this tutorial on how to remove query strings from static resources in WordPress and improve speed.","twitter_image":"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png","twitter_creator":"@brianleejackson","twitter_site":"@kinsta","twitter_misc":{"Written by":"Brian Jackson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#article","isPartOf":{"@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/"},"author":{"name":"Brian Jackson","@id":"https:\/\/kinsta.com\/#\/schema\/person\/079824c00ccc2b7141504f27ea63bef7"},"headline":"How to Remove Query Strings from Static Resources in WordPress","datePublished":"2016-09-02T23:45:13+00:00","dateModified":"2026-03-18T17:34:25+00:00","mainEntityOfPage":{"@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/"},"wordCount":690,"publisher":{"@id":"https:\/\/kinsta.com\/#organization"},"image":{"@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#primaryimage"},"thumbnailUrl":"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png","keywords":["webdev","webperf"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/","url":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/","name":"How to Remove Query Strings from Static Resources in WordPress","isPartOf":{"@id":"https:\/\/kinsta.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#primaryimage"},"image":{"@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#primaryimage"},"thumbnailUrl":"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png","datePublished":"2016-09-02T23:45:13+00:00","dateModified":"2026-03-18T17:34:25+00:00","description":"Not every server or CDN can cache query strings. Follow this tutorial on how to remove query strings from static resources in WordPress and improve speed.","breadcrumb":{"@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#primaryimage","url":"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png","contentUrl":"https:\/\/kinsta.com\/wp-content\/uploads\/2016\/09\/remove-query-strings-static-resources.png","width":1460,"height":730,"caption":"Remove query strings from static resources"},{"@type":"BreadcrumbList","@id":"https:\/\/kinsta.com\/blog\/remove-query-strings-static-resources\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kinsta.com\/"},{"@type":"ListItem","position":2,"name":"WordPress Tips","item":"https:\/\/kinsta.com\/topic\/wordpress-tips\/"},{"@type":"ListItem","position":3,"name":"How to Remove Query Strings from Static Resources in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/kinsta.com\/#website","url":"https:\/\/kinsta.com\/","name":"Kinsta\u00ae","description":"Kinsta: Simply better hosting.","publisher":{"@id":"https:\/\/kinsta.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kinsta.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kinsta.com\/#organization","name":"Kinsta","alternateName":"Kinsta Inc, Kinsta Ltd","url":"https:\/\/kinsta.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kinsta.com\/#\/schema\/logo\/image\/","url":"https:\/\/kinsta.com\/wp-content\/uploads\/2023\/12\/kinsta-logo.jpeg","contentUrl":"https:\/\/kinsta.com\/wp-content\/uploads\/2023\/12\/kinsta-logo.jpeg","width":500,"height":500,"caption":"Kinsta"},"image":{"@id":"https:\/\/kinsta.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/kinstahosting","https:\/\/x.com\/kinsta","https:\/\/www.instagram.com\/kinstahosting\/","https:\/\/www.linkedin.com\/company\/kinsta\/","https:\/\/www.pinterest.com\/kinstahosting\/","https:\/\/www.youtube.com\/Kinsta","https:\/\/www.crunchbase.com\/organization\/kinsta-wordpress-hosting","https:\/\/www.wikidata.org\/wiki\/Q106594994"],"description":"Kinsta: Simply better hosting for WordPress. Fast, secure, scalable, and backed by world-class support. Built to power your growth.","email":"contact@kinsta.com","telephone":"+1 (888) 610-2915","legalName":"Kinsta Inc.","foundingDate":"2013-12-01","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"201","maxValue":"500"}},{"@type":"Person","@id":"https:\/\/kinsta.com\/#\/schema\/person\/079824c00ccc2b7141504f27ea63bef7","name":"Brian Jackson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kinsta.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/79623d815f4ed4c8c2457392d728cb16?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/79623d815f4ed4c8c2457392d728cb16?s=96&d=mm&r=g","caption":"Brian Jackson"},"description":"Brian has a huge passion for WordPress, has been using it for over a decade, and even develops a couple of premium plugins. Brian enjoys blogging, movies, and hiking. Connect with Brian on Twitter.","sameAs":["https:\/\/www.facebook.com\/fm.brianleejackson","https:\/\/www.linkedin.com\/in\/brianleejackson","https:\/\/x.com\/brianleejackson"],"url":"https:\/\/kinsta.com\/blog\/author\/brianjackson\/"}]}},"_wl_alt_label":[],"wl:entity_url":"http:\/\/data.wordlift.io\/wl0150038\/knowledgebase\/how_to_remove_query_strings_from_static_resources_in_wordpress","_links":{"self":[{"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/posts\/6366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/comments?post=6366"}],"version-history":[{"count":12,"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/posts\/6366\/revisions"}],"predecessor-version":[{"id":207619,"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/posts\/6366\/revisions\/207619"}],"alternate":[{"embeddable":true,"hreflang":"it","title":"Italian","href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/translations\/it"},{"embeddable":true,"hreflang":"en","title":"English","href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/translations\/en"},{"embeddable":true,"hreflang":"fr","title":"French","href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/translations\/fr"},{"embeddable":true,"hreflang":"es","title":"Spanish","href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/translations\/es"},{"embeddable":true,"hreflang":"pt","title":"Portuguese","href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/translations\/pt"},{"embeddable":true,"hreflang":"nl","title":"Dutch","href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/translations\/nl"},{"embeddable":true,"hreflang":"da","title":"Danish","href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/translations\/dk"},{"embeddable":true,"hreflang":"de","title":"German","href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/translations\/de"},{"embeddable":true,"hreflang":"ja","title":"Japanese","href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/translations\/jp"},{"href":"https:\/\/kinsta.com\/wp-json\/kinsta\/v1\/posts\/6366\/tree"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/media\/41059"}],"wp:attachment":[{"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/media?parent=6366"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/tags?post=6366"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/topic?post=6366"},{"taxonomy":"wl_entity_type","embeddable":true,"href":"https:\/\/kinsta.com\/wp-json\/wp\/v2\/wl_entity_type?post=6366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}