About the Magento CLI
Magento 2.0 introduces a new command-line interface (CLI). The CLI enables you to do many common installation and configuration tasks from the command line, including:- Managing the cache.
- Managing catalogs.
- Managing indexes.
- Installing and upgrading the database schema.
- Enabling and disabling maintenance mode.
- Managing modules.
- Managing translations.
Using the Magento CLI
To configure and run the Magento CLI, follow these steps:- Log in to your account using SSH.
-
At the command prompt, change to the directory where Magento is installed. For example, if Magento is installed in the document root directory, type
cd ~/public_html. - Type the following command to make the CLI executable:
- To run the CLI and view the available command options, type the following command:
The CLI has many command options. For example, to flush the caches, type the following command:
For detailed information about all of the CLI’s options, please visit the official Magento documentation at http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli.html.