To list all available Magento commands
php bin/magento --list
Deploy modes:
// show active deploy mode
php bin/magento deploy:mode:show
// enable developer mode
php bin/magento deploy:mode:set developer
// enable production mode
php bin/magento deploy:mode:set production
Cache Commands
// flush cache
php bin/magento cache:flush
// clear cache
php bin/magento cache:clear
Deploy code:
// Deploy code.
php bin/magento setup:static-content:deploy
Compile code :
// compile code
php bin/magento setup:di:compile
Module Commands
View list of modules enabled/disabled modules
// check module status
php bin/magento module:status
// enable module
php bin/magento module:enable Mageplaza_HelloWorld
// disable module
php bin/magento module:disable Mageplaza_HelloWorld
After module installation, run all below commands to make it work.
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
Maintenance mode
// enable maintenance modephp bin/magento maintenance:enable
// disable maintenance mode.
php bin/magento maintenance:disable
No comments:
Post a Comment