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

Copy
php bin/magento s:up

If you don’t want to remove pub/static files while installing/updating database then use the following command.

Copy
php bin/magento s:up --keep-generated

Command Shortcut for Cache Clean

Copy
php bin/magento c:c

Command Shortcut for Cache Flush

Copy
php bin/magento c:f

Command Shortcut for Disable Cache

Copy
php bin/magento c:d

Command Shortcut for Enable Cache

Copy
php bin/magento c:e

Command Shortcut for Reindexing

Copy
php bin/magento i:rei

Command Shortcut for View the list of indexers

Copy
php bin/magento i:i

Command Shortcut for View indexer status

Copy
php bin/magento i:st

Command Shortcut for View indexer Resets

Copy
php bin/magento i:res

Command Shortcut for Show the mode of all indexers

Copy
php bin/magento i:sh

Command Shortcut for Static Content Deploy

Copy
php bin/magento s:s:d

Command Shortcut for Static Content Deploy For Particular Language

Copy
php bin/magento s:s:d en_US

Command Shortcut for Static Content Deploy For Magento Backend theme

Copy
php bin/magento s:s:d --theme="Magento/backend"

Command Shortcut for Static Content Deploy For Specific Themes

Copy
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

Copy
php bin/magento s:s:d en_US --exclude-theme Magento/luma --no-html-minify

Command Shortcut for Di Compile

Copy
php bin/magento s:d:c

Command Shortcut for See all modules Status

Copy
php bin/magento mo:s

Command Shortcut for Enable module

Copy
php bin/magento mo:e Namespace_Module

Command Shortcut for Disable module

Copy
php bin/magento mo:d Namespace_Module

Command Shortcut for Uninstall Module

Copy
php bin/magento mo:u Namespace_Module

Command Shortcut for Check Current Mode

Copy
php bin/magento d:m:sh

Command Shortcut for Change To Developer Mode

Copy
php bin/magento d:m:se developer

Command Shortcut for Change To Production Mode

Copy
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.