Controlling M2 via command line – when and why to use each command

Magento 2 Upgrade Command:

php -d set_time_limit=3600 -d memory_limit=1024M bin/magento setup:upgrade

Magento 2 reindex Command:

php bin/magento indexer:reindex

Magento 2 flush cache Command:

php bin/magento cache:flush

Magento 2 static content deploy Command:

php bin/magento setup:static-content:deploy

Magento 2 check developer mode Command:

php bin/magento deploy:mode:show

Magento 2 set developer mode Command:

php bin/magento deploy:mode:set developer
php bin/magento deploy:mode:set production

Magento 2 static content deploy Command if get memory error:

php -dmemory_limit=6G bin/magento setup:static-content:deploy

Magento 2 Disable module command:

php bin/magento module:disable Module_Name

Magento 2 enable module command:

php bin/magento module:enable Module_Name

Magento 2 command to find the all disabled/enabled module command:

php bin/magento module:status
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s