0

This question already has an answer here:

list of magento 2 SSH CLI Commands

what is magento ssh cli command for Upgrade?

what is magento ssh cli command for Cache Clean?

what is magento ssh cli command for Cache Flush?

what is magento ssh cli command for View cache status?

what is magento ssh cli command for Enable Cache?

what is magento ssh cli command for Disable Cache?

what is magento ssh cli command for Static Content Deploy?

what is magento ssh cli command for Static Content Deploy For Particular Language?

what is magento ssh cli command for Static Content Deploy For Magento Backend Theme?

what is magento ssh cli command for Static Content Deploy For Specific Themes ?

what is magento ssh cli command for Reindexing ?

what is magento ssh cli command for View the list of indexers ?

what is magento ssh cli command for View indexer status ?

what is magento ssh cli command for Show the mode of all indexers ?

what is magento ssh cli command for See all modules Status?

what is magento ssh cli command for Enable module?

what is magento ssh cli command for Disable module?

what is magento ssh cli command for Uninstall ?

what is magento ssh cli command for Check Current Mode ?

what is magento ssh cli command for Change To Developer Mode ?

what is magento ssh cli command for Change To Production Mode ?

what is magento ssh cli command for Run the Compiler and compile ?

what is magento ssh cli command for Unlock Admin User ?

what is magento ssh cli command for Enable Maintenance Mode?

what is magento ssh cli command for clear the list of IPs?

what is magento ssh cli command for Disable Maintenance Mode ?

what is magento ssh cli command for Check Maintenance Mode Status ?

what is magento ssh cli command for Allow IP on Maintenance ?

marked as duplicate by Piyush, Manashvi Birla, sv3n, Keyur Shah, Priyank Jan 9 at 13:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4

admin

    php bin/magento admin:user:create              php bin/magento a:u:c
    php bin/magento admin:user:unlock              php bin/magento a:u:u   

cache

    php bin/magento cache:clean                  php bin/magento c:c
    php bin/magento cache:disable                php bin/magento c:d
    php bin/magento cache:enable                 php bin/magento c:e
    php bin/magento cache:flush                  php bin/magento c:f
    php bin/magento cache:status                 php bin/magento c:s

catalog

    php bin/magento catalog:images:resize                   php bin/magento c:i:r
    php bin/magento catalog:product:attributes:cleanup      php bin/magento c:p:a:c

cron

    php bin/magento cron:run              php bin/magento c:r

customer

    php bin/magento customer:hash:upgrade     php bin/magento c:h:u

deploy

    php bin/magento deploy:mode:set           php bin/magento d:m:se
    php bin/magento deploy:mode:show          php bin/magento d:m:sh

dev

    php bin/magento dev:source-theme:deploy        php bin/magento d:source-theme:d
    php bin/magento dev:tests:run                  php bin/magento d:t:r
    php bin/magento dev:urn-catalog:generate       php bin/magento d:urn-catalog:g
    php bin/magento dev:xml:convert                php bin/magento d:x:c

i18n

    php bin/magento i18n:collect-phrases           php bin/magento i:collect-phrases
    php bin/magento i18n:pack                      php bin/magento i:p
    php bin/magento i18n:uninstall                 php bin/magento i:u

indexer

    php bin/magento indexer:info                   php bin/magento i:i
    php bin/magento indexer:reindex                php bin/magento i:rei
    php bin/magento indexer:reset                  php bin/magento i:res
    php bin/magento indexer:set-mode               php bin/magento i:set
    php bin/magento indexer:show-mode              php bin/magento i:show
    php bin/magento indexer:status                 php bin/magento i:st

info

    php bin/magento info:adminuri                              php bin/magento i:a
    php bin/magento info:backups:list                          php bin/magento i:b:l
    php bin/magento info:currency:list                         php bin/magento i:c:l
    php bin/magento info:dependencies:show-framework           php bin/magento i:d:show-framework
    php bin/magento info:dependencies:show-modules             php bin/magento i:d:show-modules
    php bin/magento info:dependencies:show-modules-circular    php bin/magento i:d:show-circular
    php bin/magento info:language:list                         php bin/magento i:l:l
    php bin/magento info:timezone:list                         php bin/magento i:t:l

maintenance

    php bin/magento maintenance:allow-ips          php bin/magento ma:a
    php bin/magento maintenance:disable            php bin/magento ma:d
    php bin/magento maintenance:enable             php bin/magento ma:e
    php bin/magento maintenance:status             php bin/magento ma:s

module

    php bin/magento module:disable                 php bin/magento mo:d
    php bin/magento module:enable                  php bin/magento mo:e
    php bin/magento module:status                  php bin/magento mo:s
    php bin/magento module:uninstall               php bin/magento mo:u

sampledata

    php bin/magento sampledata:deploy            php bin/magento ma:d
    php bin/magento sampledata:remove            php bin/magento sa:rem
    php bin/magento sampledata:reset             php bin/magento sa:res

setup

    php bin/magento setup:backup                            php bin/magento se:b
    php bin/magento setup:config:set                        php bin/magento se:c:se
    php bin/magento setup:cron:run                          php bin/magento se:c:r
    php bin/magento setup:db-data:upgrade                   php bin/magento se:db-data:u
    php bin/magento setup:db-schema:upgrade                 php bin/magento se:db-schema:u
    php bin/magento setup:db:status                         php bin/magento se:d:st
    php bin/magento setup:di:compile                        php bin/magento se:d:c
    php bin/magento setup:install                           php bin/magento se:i
    php bin/magento setup:performance:generate-fixtures     php bin/magento se:p:generate-fixtures
    php bin/magento setup:rollback                          php bin/magento se:r
    php bin/magento setup:static-content:deploy             php bin/magento se:s:d
    php bin/magento setup:store-config:set                  php bin/magento se:sto:s 
    php bin/magento setup:uninstall                         php bin/magento se:un
    php bin/magento setup:upgrade                           php bin/magento se:up

theme

    php bin/magento theme:uninstall                         php bin/magento t:u
  • is there any new command for version 2.3 ? – eima Jan 9 at 10:03
  • @eima, No New commands, If next version will get new than you will find out those using php bin/magento BY this all commands will display in your terminal. Also if you find it's correct than you can provide up vote. ;) – anonymous Jan 9 at 10:09
0

Next Time do some research in Google: Commands

 - Setup Upgrade Using Command Line

        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 Command Line


    php bin/magento cache:clean



 - Cache Flush Using Command Line


    php bin/magento cache:flush



 - View cache status Using Command Line


    php bin/magento cache:status



 - Enable Cache Using Command Line


    php bin/magento cache:enable [cache_type]



 - Disable Cache Using Command Line


    php bin/magento cache:disable [cache_type]



 - Static Content Deploy Using Command Line (Use -f for force deploy on
       2.2.x or later)


    php bin/magento setup:static-content:deploy



 - Static Content Deploy For Particular Language Using Command Line


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



 - Static Content Deploy For Magento Backend Theme Using Command Line
   (Working on 2.1.1 or later)


    php bin/magento setup:static-content:deploy --theme="Magento/backend"



 - Static Content Deploy For Specific Themes Using Command Line (Working
   on 2.1.1 or later)


    php bin/magento setup:static-content:deploy --theme Magento/luma
    --theme Magento/second_theme



 - Exclude Themes on Static Content Deploy and does not minify HTML
   files Using Command Line (Working on 2.1.1 or later)


    php bin/magento setup:static-content:deploy en_US --exclude-theme Magento/luma --no-html-minify




 - Reindexing Using Command Line


    php bin/magento indexer:reindex




 - View the list of indexers Using Command Line


    php bin/magento indexer:info



 - View indexer status Using Command Line


    php bin/magento indexer:status



 - Show the mode of all indexers Using Command Line


    php bin/magento indexer:show-mode



 - See all modules Status Using Command Line


    php bin/magento module:status



 - Enable module Using Command Line


    php bin/magento module:enable Namespace_Module



 - Disable module Using Command Line


    php bin/magento module:disable Namespace_Module



 - Uninstall Module Using Command Line


    php bin/magento module:uninstall Namespace_Module



 - Check Current Mode Using Command Line


    php bin/magento deploy:mode:show



 - Change To Developer Mode Using Command Line


    php bin/magento deploy:mode:set developer



 - Change To Production Mode Using Command Line


    php bin/magento deploy:mode:set production



 - Run the single-tenant Compiler Using Command Line


    php bin/magento setup:di:compile



 - Unlock Admin User Using Command Line


    php bin/magento admin:user:unlock adminusername



 - Enable Maintenance Mode Using Command Line


    php bin/magento maintenance:enable



 - To enable maintenance mode for all clients except 192.0.0.1 and
       192.0.0.2:


    php bin/magento maintenance:enable --ip=192.0.0.1 --ip=192.0.0.2



 - To clear the list of IPs.


    php bin/magento maintenance:enable --ip=none



 - Disable Maintenance Mode Using Command Line


    php bin/magento maintenance:disable



 - Check Maintenance Mode Status Using Command Line


    php bin/magento maintenance:status



 - Allow IP on Maintenance Mode Using Command Line


    php bin/magento maintenance:allow-ips --ip=192.0.0.1 --ip=192.0.0.2



 - Set Magento crontab Using Command Line

    php bin/magento cron:install --force

    Use --force to rewrite an existing Magento crontab. To view the crontab, enter the following command as the Magento file system owner.

    crontab -l


 - Remove Magento crontab Using Command Line


    php bin/magento cron:remove
  • is there any new command for version 2.3 ? – eima Jan 9 at 10:03
  • No there is not – Ylgen Guxholli Jan 9 at 10:05
0

-For Cache php bin/magento cache:status php bin/magento cache:enable php bin/magento cache:disable php bin/magento cache:clean php bin/magento cache:flush

-For Upgrade php bin/magento setup:upgrade php bin/magento setup:upgrade --keep-generated

-For Content Deployment php bin/magento setup:static-content:deploy php bin/magento setup:static-content:deploy en_US php bin/magento setup:static-content:deploy --theme="Magento/backend" php bin/magento setup:static-content:deploy --theme Magento/luma --theme Magento/second_theme php bin/magento setup:static-content:deploy en_US --exclude-theme Magento/luma --no-html-minify

-For Indexing php bin/magento indexer:reindex php bin/magento indexer:info php bin/magento indexer:status php bin/magento indexer:show-mode php bin/magento indexer:set-mode {schedule|realtime} [indexer]

For example: magento indexer:set-mode schedule catalog_category_product catalog_product_category

Switching to the «Update on Save» («realtime») mode: bin/magento indexer:set-mode realtime

Switching to the «Update by Schedule» («schedule») mode: bin/magento indexer:set-mode schedule

-For Module php bin/magento module:status php bin/magento module:enable Module_Namespace php bin/magento module:disable Module_Namespace php bin/magento module:uninstall Module_Namespace

-For Change Mode of Magento php bin/magento deploy:mode:show php bin/magento deploy:mode:set developer php bin/magento deploy:mode:set production

php bin/magento setup:di:compile

php bin/magento admin:user:unlock adminusername

php bin/magento maintenance:enable php bin/magento maintenance:enable --ip=192.0.0.1 --ip=192.0.0.2 php bin/magento maintenance:enable --ip=none php bin/magento maintenance:disable php bin/magento maintenance:status php bin/magento maintenance:allow-ips --ip=192.0.0.1 --ip=192.0.0.2

php bin/magento cron:install --force crontab -l php bin/magento cron:remove

//======================================Shortcut Command===========================================

Available commands:

php bin/magento list php bin/magento l

//=======admin======= php bin/magento admin:user:create php bin/magento a:u:c php bin/magento admin:user:unlock php bin/magento a:u:u

//=======cache======= php bin/magento cache:clean php bin/magento c:c php bin/magento cache:disable php bin/magento c:d php bin/magento cache:enable php bin/magento c:e php bin/magento cache:flush php bin/magento c:f php bin/magento cache:status php bin/magento c:s

//=======catalog======= php bin/magento catalog:images:resize php bin/magento c:i:r php bin/magento catalog:product:attributes:cleanup php bin/magento c:p:a:c

//=======cron======= php bin/magento cron:run php bin/magento c:r

//=======customer======= php bin/magento customer:hash:upgrade php bin/magento c:h:u

//=======deploy======= php bin/magento deploy:mode:set php bin/magento d:m:se php bin/magento deploy:mode:show php bin/magento d:m:sh

//=======dev======= php bin/magento dev:source-theme:deploy php bin/magento d:source-theme:d php bin/magento dev:tests:run php bin/magento d:t:r php bin/magento dev:urn-catalog:generate php bin/magento d:urn-catalog:g php bin/magento dev:xml:convert php bin/magento d:x:c

//=======i18n======= php bin/magento i18n:collect-phrases php bin/magento i:collect-phrases php bin/magento i18n:pack php bin/magento i:p php bin/magento i18n:uninstall php bin/magento i:u

//=======indexer======= php bin/magento indexer:info php bin/magento i:i php bin/magento indexer:reindex php bin/magento i:rei php bin/magento indexer:reset php bin/magento i:res php bin/magento indexer:set-mode php bin/magento i:set php bin/magento indexer:show-mode php bin/magento i:show php bin/magento indexer:status php bin/magento i:st

//=======info======= php bin/magento info:adminuri php bin/magento i:a php bin/magento info:backups:list php bin/magento i:b:l php bin/magento info:currency:list php bin/magento i:c:l php bin/magento info:dependencies:show-framework php bin/magento i:d:show-framework php bin/magento info:dependencies:show-modules php bin/magento i:d:show-modules php bin/magento info:dependencies:show-modules-circular php bin/magento i:d:show-circular php bin/magento info:language:list php bin/magento i:l:l php bin/magento info:timezone:list php bin/magento i:t:l

//=======maintenance======= php bin/magento maintenance:allow-ips php bin/magento ma:a php bin/magento maintenance:disable php bin/magento ma:d php bin/magento maintenance:enable php bin/magento ma:e php bin/magento maintenance:status php bin/magento ma:s

//=======module======= php bin/magento module:disable php bin/magento mo:d php bin/magento module:enable php bin/magento mo:e php bin/magento module:status php bin/magento mo:s php bin/magento module:uninstall php bin/magento mo:u

//=======sampledata======= php bin/magento sampledata:deploy php bin/magento ma:d php bin/magento sampledata:remove php bin/magento sa:rem php bin/magento sampledata:reset php bin/magento sa:res

//=======setup======== php bin/magento setup:backup php bin/magento se:b php bin/magento setup:config:set php bin/magento se:c:se php bin/magento setup:cron:run php bin/magento se:c:r php bin/magento setup:db-data:upgrade php bin/magento se:db-data:u php bin/magento setup:db-schema:upgrade php bin/magento se:db-schema:u php bin/magento setup:db:status php bin/magento se:d:st php bin/magento setup:di:compile php bin/magento se:d:c php bin/magento setup:install php bin/magento se:i php bin/magento setup:performance:generate-fixtures php bin/magento se:p:generate-fixtures php bin/magento setup:rollback php bin/magento se:r php bin/magento setup:static-content:deploy php bin/magento se:s:d php bin/magento setup:store-config:set php bin/magento se:sto:s php bin/magento setup:uninstall php bin/magento se:un php bin/magento setup:upgrade php bin/magento se:up

//=======theme======= php bin/magento theme:uninstall php bin/magento t:u

//======================================Shortcut Command===========================================enter code here

Not the answer you're looking for? Browse other questions tagged or ask your own question.