Question

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.

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top