Magento 2 - Daily useful Command List

Magento 2 - command list

Have you heard about shortcuts of command we can use in magento version 2?
Haven't!!! Don't worry, here we have explained command list along how do command shortcut perform same task what command perform.

Well, start with the explanation of how shortcut works.

The first one to three letter of the command becomes the shortcut for thier own. If don't understand , let's take an example.

Firstly, we take a cache clean command.

php bin/magento cache:clean

a short command for this.

php bin/magento c:c

Explanation:

From 'cache:clean' take first letters or first two to three letters from command. Therefore, c stand for cache and another c stand for clean.
That's how shortcut works.

Now, look at some useful commands and excercise thier shortcuts.

Module Enable/Disable

1) Enable module(s)

        php bin/magento module:enable [-c|--clear-static-content] [-f|--force] [--all] <module-list>
        e.g. php bin/magento module:enable Magento_Weee

2) Disable Module(s)
        php bin/magento module:disable [-c|--clear-static-content] [-f|--force] [--all] <module-list>
        e.g. php bin/magento module:disable Magento_Weee

3) Status of modules
       php bin/magento module:status

Shortcut:

  1.  php bin/magento mod:ena Magento_Weee
  2.  php bin/magento mod:dis Magento_Weee
  3.  php bin/magento mod:sta


Update the Database

          php bin/magento setup:upgrade

    Shortcut :
          php bin/magento set:upg

Compile 
          php bin/magento setup:di:compile

     Shortcut:
           php bin/magento set:di:com

Mode of deploy
        php bin/magento deploy:mode:show

     Shortcut:
           php bin/magento de:mo:sho

Content Deployment

          php bin/magento setup:static-content:deploy

          php bin/magento setup:static-content:deploy de_DE en_US

      Shortcut:
           php bin/magento s:s:d

           php bin/magento s:s:d de_DE en_US

Indexing

     1. Get a list of available indexing
php bin/magento indexer:info
     2. Indexing Status
php bin/magento indexer:status
     3. Particular Status of indexing
php bin/magento indexer:status catalog_category_product
     4. Reindex All
php bin/magento indexer:reindex
     
      Shortcut:
          1. php bin/magento in:in
          2. php bin/magento in:st
          3. php bin/magento in:st catalog_category_product
          4. php bin/magento in:re

Those are the mostly and daily useful command list for any magento developer/designer.

For more commands you may refer:

https://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands.html

If like my efforts, Please share, comment and subscribe for future posts and inspire more.

Comments

Popular posts from this blog

Hosting and Goodies

Magento 2 Import Scripts

How to add product attribute value in minicart magento 2