1

It is possible to keep pub/static folder as it is after run setup:upgrade command.

Becuase I have multilanguage site and every time when we add new module I run upgrade command and run content deploy for every language.

So it is possible to keep pub/static content during setup:upgrade command?

5

you can tell Magento not to get rid of generated code and static files:

magento setup:upgrade --keep-generated

From docs:

where --keep-generated is an optional argument that does not update static view files. This optional argument is for use only in limited circumstances by experienced system integrators. It should be used only in production mode. It should not be used in developer mode.

Please note you can get into trouble doing this if you're not careful. I would stick to using the proper deployment process.

Why do you want to avoid deleting the file? Is it just to speed up the deployment?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.