(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
<a href=“https://serverguy.com/magento-hosting/\”><img src=“https://serverguy.com/wp-content/uploads/2018/03/5.png\” alt=“Magento Hosting” title=""/>
Also Read
- <a href=“https://serverguy.com/magento/install-magento-2-4-with-command-line/\” target=“_blank” rel=“noreferrer noopener”>How to Install Magento 2.4 with Command Line?- <a href=“https://serverguy.com/magento/what-are-mysql-triggers/\” target=“_blank” rel=“noreferrer noopener”>What are MySQL Triggers and How to create them?- <a href=“https://serverguy.com/magento/change-magento-2-base-url/\” target=“_blank” rel=“noreferrer noopener”>How to Change Magento 2 Base URL?- <a href=“https://serverguy.com/magento/magento-2-requirements/\” target=“_blank” rel=“noreferrer noopener”>Magento 2 Requirements that You Must Take care of
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.