cancel
Showing results for 
Search instead for 
Did you mean: 

static with version folder

static with version folder

Hello. 

After migration magento from one server to another I have a problem with static files. 

 

2020/04/03 17:37:30 [error] 20099#20099: *3262 open() "/var/www/kd/login/pub/static/version1585935112/frontend/Codazon/fastest_fashion/en_US/mage/polyfill.js" failed (2: No such file or directory)

 

I don't have version1585935112 at all, do I need to generate it somehow ? 

1 REPLY 1

Re: static with version folder

Hi @nmnmum,

 

Yes, when you are moving code one server to another server then you need to redeploy using below command.

 

 

If you want to remove version number from url then you do from admin as well or from database.

 

UPDATE core_config_data SET value =0 WHERE path = 'dev/static/sign' ;

 

https://devdocs.magento.com/guides/v2.3/config-guide/cache/static-content-signing.html

 

To redeploy follow below command:

 

chmod -R 0777 var/ pub/ generated/
rm -rf var/cache/* var/view_preprocessed/* generated/* pub/static/*

php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

I hope it will help you!