문제

After a year or so of working in Developer Mode, I'm now using Production Mode.

As I deploy updates to modules or designs, I'm wondering when I should run the below commands. At the moment, my order of operations is:

  1. Update files in app/code or app/design
  2. Run bin/magento setup:di:compile
  3. Run bin/magento setup:static-content:deploy en_GB

Is this still necessary when updating something like a stylesheet or template?

도움이 되었습니까?

해결책

php bin/magento setup:upgrade :

Upgrades the Magento application, DB data, and schema

php bin/magento setup:di:compile :

Generates DI configuration and all missing classes that can be auto-generated

php bin/magento setup:static-content:deploy :

Deploys static view files

CSS where is it placed ? in view files : app/design/frontend/{Theme}/{name}/web/css/custom.css or app/code/Vendor/Name/view/frontend/web/css/custom.css So YES you need to deploy the static-contents on production mode.

Magento DevDocs says :

The static view files deployment command enables you to write static files to the Magento file system when the Magento software is set for production mode.

Good luck

다른 팁

The brief answer is yes for stylesheet/templates you would then need to redeploy the static content. You wouldn't need to compile.

Compilation would be required for something like, for example, adding a new extension or adding a new instance of a model into an existing module.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top