Magento Command Line steps for updating code files on server in Production
-
14-04-2021 - |
質問
What are the steps to add a module on Production Store Site for Magento. Do I switch to maintenance mode from Production then run the php bin/magento setup:upgrade
and other commands then turn off maintenance mode then switch back to production? Just wanted to make sure the proper way to update a production site.
解決
Follow below steps :-
1- set maintenance mode
php bin/magento maintenance:enable
2- Upload module or use composer to install module using cli
3- Enable module
php bin/magento module:enable MyCompany_MyModule
4- upgrade database
php bin/magento setup:upgrade
5-compile your code
php bin/magento setup:di:compile
6-static content deploy
php bin/magento setup:static-content:deploy en_US
7-reindex (optional)
php bin/magento indexer:reindex
8-clear cache
php bin/magento cache:flush
9-Disable maintenance mode
php bin/magento maintenance:disable
所属していません magento.stackexchange