Skip to content
ZenoCloud Call

Magento 2 Commands: A Useful list for Magento Developers

(s) php bin/magento cache:flushv Checks cache status php bin/magento cache:status Resize product images php bin/magento catalog:images:resize Upgrade customer’s.

First written in 2023. Things may have changed since.

A matte navy slab with a dark glass face showing one large gold prompt chevron and cursor, on warm paper.

(s)

php bin/magento cache:flushv

**Checks cache status**

php bin/magento cache:status

**Resize product images**

php bin/magento catalog:images:resize

**Upgrade customer’s hash according to the latest algorithm**

php bin/magento customer:hash:upgrade

Cron Commands

**Generates and installs crontab for current user**

php bin/magento cron:install

**Removes tasks from crontab**

php bin/magento cron:remove

**Runs jobs by schedule**

php bin/magento cron:run

Deploying Apps

**Set application mode**

php bin/magento deploy:mode:set

**Displays current application mode**

php bin/magento deploy:mode:show

Indexer Commands

**Shows allowed Indexers**

php bin/magento indexer:info

**Reindexes Data**

php bin/magento indexer:reindex

**Resets indexer status to invalid**

php bin/magento indexer:reset

**Sets index mode type**

php bin/magento indexer:set-mode

**Shows Index Mode**

php bin/magento indexer:show-mode

**Shows status of Indexer**

php bin/magento indexer:status

**Also Read:** How to Reindex Magento 2 from SSH/CLI or Admin Panel?

Info Commands

Displays the Magento Admin URI

php bin/magento info:adminuri

**Prints list of available backup files **

php bin/magento Info:backups:list

**Displays the list of available currencies**

php bin/magento info:currency:list

**Shows number of dependencies on Magento framework**

php bin/magento Info:dependencies:show-framework

**Shows number of dependencies between modules**

php bin/magento info:dependencies:show-modules

**Prints list of available backup files**

php bin/magento info:backups:list

Setup Commands

**Takes backup of Magento Application code base, media and database**

php bin/magento Setup:backup

**Installs the Magento application**

php bin/magento Setup:install

**Generates fixtures**

php bin/magento Setup:performance:generate-fixtures

**Rolls back Magento Application codebase, media and database**

php bin/magento Setup:rollback

**Deploys static view files**

php bin/magento Setup:static-content:deploy

**Installs the store configuration. Deprecated since 2.2.0. Use config:set instead**

php bin/magento Setup:store-config:set

**Uninstalls the Magento application**

php bin/magento Setup:uninstall

**Upgrades the Magento application, DB data, and schema**

php bin/magento setup:upgrade

Store Commands

**Displays the list of stores**

php bin/magento store:list

**Displays the list of websites**

php bin/magento store:website:list

**Uninstalls theme**

php bin/magento Theme:uninstall

**Generates Varnish VCL and echos it to the command line**

php bin/magento varnish:vcl:generate

Magento Hosting

Also Read

Wrapping Up

I hope these Magento 2 commands can help you in managing the Magento. This is a list of important and most used SSH/CLI commands for Magento 2.

Magento is surely a powerful CMS for eCommerce. However, it is a complicated program, and developers handle lots of things from the back-end.

If there are more important commands that I missed, mention them in the comment.

Next step

Run Magento on infrastructure built for it.

See Magento hosting

Related services

Browse all field notes
Quote request

What should we quote?

Describe the configuration or problem, location and timing.