{"id":687,"date":"2019-11-11T00:03:03","date_gmt":"2019-11-11T00:03:03","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2019\/11\/11\/remove-version-number-in-file-paths-in-magento-2\/"},"modified":"2025-10-03T13:16:49","modified_gmt":"2025-10-03T07:46:49","slug":"remove-version-number-in-file-paths-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/remove-version-number-in-file-paths-in-magento-2\/","title":{"rendered":"How To Remove Version Number In File Paths in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Magento 2 offers a feature of static content signing to invalidate the browser cache for static resources. To do so, it adds a deployment version to the URL of the static files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, these files\u2019 URLs contain the deployed version due to which 404 error occurs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The solution is to remove the version number in file paths in Magento 2 and there are two methods given below for the same.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Methods to Remove Version Number In File Paths in Magento 2:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Method 1: From Admin Panel<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">1. <strong>Login<\/strong> to admin panel<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Go to <strong>Stores &gt; Configuration<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. Under <strong>Advanced<\/strong>, select <strong>Developer<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4. Expand <strong>Static Files Settings<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5. Set \u201cNo\u201d to <strong>Sign Static Files<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2019\/11\/1_How-To-Remove-Version-Number-In-File-Paths-in-Magento-2-1024x434.png\" alt=\"How To Remove Version Number In File Paths in Magento 2\" class=\"wp-image-6882\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Method 2: Run the below commands<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">INSERT INTO `core_config_data` (\n    `config_id`,\n    `scope`,\n    `scope_id`,\n    `path`,\n    `value`\n) VALUES (\n    NULL,\n    'default',\n    0,\n    'dev\/static\/sign',\n    0\n);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, run the below commands<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento setup:static-content:deploy -f\nphp bin\/magento cache:flush\nphp bin\/magento cache:clean<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Try any of the above methods to disable static content signing in Magento 2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Feel free to share the solution with fellow developers via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento 2 offers a feature of static content signing to invalidate the browser cache for static resources. To do so, it adds a deployment version to the URL of the static files. However, these files\u2019 URLs contain the deployed version due to which 404 error occurs. The solution is to remove the version number in [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-687","post","type-post","status-publish","format-standard","hentry","category-magento"],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=687"}],"version-history":[{"count":4,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/687\/revisions"}],"predecessor-version":[{"id":23099,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/687\/revisions\/23099"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}