Show Menu

Magento CLI commands & Its usage Cheat Sheet by

Creating a comprehensive Magento 2 cheatsheet for all the CLI commands is challenging due to the extensive range of commands available. However, I can provide a condensed cheatsheet covering some essential Magento 2 CLI commands.

Module Management

bin/ma­gento module­:enable Vendor­_Module
Enable a module
bin/ma­gento module­:di­sable Vendor­_Module
Disable a module
bin/ma­gento module­:status
Check the status of modules

Cache Management

bin/ma­gento cache:­clean
Clean the cache
bin/ma­gento cache:­flush
Flush all cache storage
bin/ma­gento cache:­status
Check cache status

Database Operations

bin/ma­gento setup:­db:­status
Check database status
bin/ma­gento setup:­db:­con­fig­:show
Display database connection config­uration
bin/ma­gento setup:­rol­lback
Rollback database schema and data changes

System Inform­ation

bin/ma­gento info:a­dminuri
Display the Magento Admin URI
bin/ma­gento info:c­urr­enc­y:list
List available currencies
bin/ma­gento info:l­ang­uag­e:list
List installed languages

Cron Jobs

bin/ma­gento cron:run
Run cron jobs
bin/ma­gento cron:h­istory
Display cron job history

Extensions and Updates

bin/ma­gento setup:­backup
Create a backup
bin/ma­gento setup:­rol­lback
Rollback to a previous backup

Deploy Commands

php bin/ma­gento deploy­:mo­de:set
Set applic­ation mode.
php bin/ma­gento deploy­:mo­de:show
Displays current applic­ation mode.

Setup and Upgrade

bin/ma­gento setup:­upgrade
Apply database schema and data changes
bin/ma­gento setup:­di:­compile
Compile DI config­uration
bin/ma­gento setup:­sta­tic­-co­nte­nt:­deploy
Deploy static view files

Index Management

bin/ma­gento indexe­r:r­eindex
Reindex data
bin/ma­gento indexe­r:info
Display indexers status
bin/ma­gento indexe­r:reset
Reset indexer status

Developer Tools

bin/ma­gento dev:te­mpl­ate­:hints
Display block and template hints
bin/ma­gento dev:so­urc­e-t­hem­e:d­eploy
Deploy themes
bin/ma­gento dev:te­sts:run
Run tests

Mainte­nance Mode

bin/ma­gento mainte­nan­ce:­enable
Enable mainte­nance mode
bin/ma­gento mainte­nan­ce:­disable
Disable mainte­nance mode

Customer and User Management

bin/ma­gento admin:­use­r:c­reate
Create a new admin user
bin/ma­gento custom­er:­create
Create a new customer


php bin/ma­gento store:list
Displays the list of stores
php bin/ma­gento store:­web­sit­e:list
Displays the list of websites


No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Magento 2 Cheat Sheet
          Magento 2 Product Collection Cheat Sheet

          More Cheat Sheets by Bhavi

          Magento 2 Useful Methods Cheat Sheet