Useful commands of Magento 2

Useful commands list of Magento 2useful-commands-of-magento-2

Setup Upgrade Using SSH

php bin/magento setup:upgrade
If you don’t want to remove pub/static files while installing/updating database then use following command.

php bin/magento setup:upgrade --keep-generated
Cache Clean Using SSH

php bin/magento cache:clean
Cache Flush Using SSH

php bin/magento cache:flush
Check Cache Status Using SSH

php bin/magento cache:status
Enable/Disable Cache Using SSH

php bin/magento cache:enable [cache_type]

php bin/magento cache:disable [cache_type]
Single-tenant Compiler Using SSH

php bin/magento setup:di:compile
Static Content Deploy Using SSH

php bin/magento setup:static-content:deploy

Use -f for force
php bin/magento setup:static-content:deploy -f

For particular language
php bin/magento setup:static-content:deploy en_US
Reindexing Using SSH

php bin/magento indexer:reindex
Enable/Disable module Using SSH

php bin/magento module:enable Namespace_Module

php bin/magento module:disable Namespace_Module
Check the mode Using SSH

php bin/magento deploy:mode:show
Cron Run Using SSH

php bin/magento cron:run

Please leave your comment for asking any question or suggestion.

Need Help?useful-commands-of-magento-2