How To Remove Version Number From File Paths in Magento 2.x

There are following three ways to remove version number from Magento 2 URL.

[1] – Magento 2 Admin

[1.1] – Go to STORES > Configuration, redirects Configuration section.

[1.2] – Left panel, Advanced > Developer

[1.3] – Right side panel, Expand Static Files Settings

[1.4] – By default It is Yes, Set “No” to Sign Static Files

[2] – CLI Command

To check the status of static content sign, run below command


php bin/magento config:show dev/static/sign

By default It is enabled, above CLI command Result as 1

Run below command to disbale status of static content sign


php bin/magento config:set dev/static/sign <value>

Here <value> =1 Enable, <value>=0 Disable


php bin/magento cache:flush

[3] – SQL Query

insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);

After that run below command

php bin/magento indexer:reindex
php bin/magento cache:flush

Finally version number will be removed from file paths as JS path, css Path etc.

Leave a Reply

Your email address will not be published. Required fields are marked *