0

When I enable the production mode everything works perfectly.

But when i run this command

php bin / magento setup: upgrade

All static files from pub/static are automatically deleted (no .htaccess) but They are not regenerated

Consequently the screen appears: Unable to retrieve deployment of static files from the file system.

I always have to generate static files every time!! There is a solution?

Is a magento 2.2.2 bug.

6
0

please run this command

php bin/magento setup:static-content:deploy -f
5
  • Yes, will generate. But the problem is that every time when i run setup:upgrade, i need to run content deploy for all my storeview – KernelPaniC Aug 27 '19 at 8:25
  • Yes, because Magento don't deploy static content automatically in production mode instead of setup upgrade you can use php bin:magento cache:flush – Waqar Ali Aug 27 '19 at 9:16
  • Yes, but if i already generated static content file in production mode and i run setup:upgrade, The contents of the pub / static folder are deleted by themselves ! – KernelPaniC Aug 27 '19 at 9:18
  • Every time you run Setip:upgrade you have to run static-content:Deploy in production i think you cannot change this phenomena – Waqar Ali Aug 27 '19 at 9:20
  • Watch this: github.com/magento/magento2/issues/6426#issuecomment-434991404 Maybe I can be clearer. Thank you!! – KernelPaniC Aug 27 '19 at 9:22

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.