Magento 2 Commands Shortcut
In this article, I have covered most of the useful Magento 2 commands shortcut which we are regularly used while development. Check the following list of Magento 2 most important SSH / CLI commands shortcut that I have found useful.
Command Shortcut for Setup Upgrade
php bin/magento s:up
If you don’t want to remove pub/static files while installing/updating database then use the following command.
php bin/magento s:up --keep-generated
Command Shortcut for Cache Clean
php bin/magento c:c
Command Shortcut for Cache Flush
php bin/magento c:f
Command Shortcut for Disable Cache
php bin/magento c:d
Command Shortcut for Enable Cache
php bin/magento c:e
Command Shortcut for Reindexing
php bin/magento i:rei
Command Shortcut for View the list of indexers
php bin/magento i:i
Command Shortcut for View indexer status
php bin/magento i:st
Command Shortcut for View indexer Resets
php bin/magento i:res
Command Shortcut for Show the mode of all indexers
php bin/magento i:sh
Command Shortcut for Static Content Deploy
php bin/magento s:s:d
Command Shortcut for Static Content Deploy For Particular Language
php bin/magento s:s:d en_US
Command Shortcut for Static Content Deploy For Magento Backend theme
php bin/magento s:s:d --theme="Magento/backend"
Command Shortcut for Static Content Deploy For Specific Themes
php bin/magento s:s:d --theme Magento/luma --theme Magento/second_theme
Command Shortcut for Exclude Themes on Static Content Deploy and does not minify HTML
php bin/magento s:s:d en_US --exclude-theme Magento/luma --no-html-minify
Command Shortcut for Di Compile
php bin/magento s:d:c
Command Shortcut for See all modules Status
php bin/magento mo:s
Command Shortcut for Enable module
php bin/magento mo:e Namespace_Module
Command Shortcut for Disable module
php bin/magento mo:d Namespace_Module
Command Shortcut for Uninstall Module
php bin/magento mo:u Namespace_Module
Command Shortcut for Check Current Mode
php bin/magento d:m:sh
Command Shortcut for Change To Developer Mode
php bin/magento d:m:se developer
Command Shortcut for Change To Production Mode
php bin/magento d:m:se production
I hope this article helps you find what you were looking for.
Bookmark it for your future reference. Do comment below if you have any other handy commands which are not included in the list.
P.S. Do share this note with your team.
Review other articles maybe it'll help you too.