group | subgroup | title | menu_title | menu_node | menu_order | functional_areas | |||
---|---|---|---|---|---|---|---|---|---|
configuration-guide |
04_CLI |
Get started with command-line configuration |
Get started with command-line configuration |
2 |
|
{% include install/before-you-begin-cli.md %}
-
Log in to the Magento server as, or switch to, the Magento file system owner.
-
Change to the following directory:
cd <your Magento install dir>/bin
Examples:
- Ubuntu:
cd /var/www/magento2/bin
- CentOS:
cd /var/www/html/magento2/bin
- Ubuntu:
php magento <command>
./magento <command>
magento <command>
(after adding{:target="_blank"}<your Magento install dir>/bin
to your systemPATH
)
The following table summarizes the available commands. Commands are shown in summary form only; for more information about a command, click the link in the Command column.
{: .bs-callout .bs-callout-info } Before you run any of these commands, you must either [install the Magento application]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) or [enable some modules]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-enable.html).
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-cache.html">magento setup:cache:{enable|disable|clean|flush|status}</a></td>
<td><p>Manages the cache</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-index.html">magento setup:indexer:{status|show-mode|set-mode|reindex|info}</a></td>
<td><p>Manages the indexers</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-cron.html">magento cron:run</a></td>
<td><p>Runs Magento cron jobs</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-compiler-multi.html">magento setup:di:compile-multi-tenant</a></td>
<td><p>Use only if you have multiple independent Magento applications (in other words, one common Magento code base but more than one independent instance of the Magento application).</p>
<p>Compiles all non-existent proxies and factories; and pre-compiles class definitions, inheritance information, and plugin definitions for multiple stores or websites.</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-compiler-single.html">magento setup:di:compile</a></td>
<td><p>Use if you have one instance of the Magento application.</p>
<p>Compiles all non-existent proxies and factories; and pre-compiles class definitions, inheritance information, and plugin definitions for one store and website.</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-depen.html">magento info:dependencies:{show-modules|show-modules-circular|show-framework}e</a></td>
<td><p>Module dependencies, circular dependencies, and Magento framework dependencies.</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-i18n.html">magento i18n:{collect-phrases|pack}</a></td>
<td><p>Creates a translation dictionary or a translation package</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-static-view.html">magento setup:static-content:deploy</a></td>
<td><p>Deploys static view files</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-less-sass.html">magento dev:source-theme:deploy</a></td>
<td><p>Creates CSS from LESS</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-test.html">magento dev:tests:run</a></td>
<td><p>Runs automated tests</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-layout-xml.html">magento dev:xml:convert</a></td>
<td><p>Update your layout XML files to match the new Extensible Stylesheet Language Transformations (XSLT) stylesheet</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-perf-data.html">magento setup:perf:generate-fixtures</a></td>
<td><p>Generate data to use for performance testing.</p></td>
</tr>
<tr>
<td><a href="{{ page.baseurl }}/install-gde/install/sample-data.html#instgde-install-sample-enable-after">magento sampledata:install</a></td>
<td><p>Installs optional Magento sample data after you install the Magento application.</p>
<p>For more details about Magento sample data, see <a href="{{ page.baseurl }}/install-gde/install/sample-data.html">Optional Magento sample data</a>.</p></td>
</tr>
</tbody>
Command | Description |
---|
{% include install/cli_help-commands.md %}
{% include install/cli_common-commands.md %}
The following sections discuss the available commands.
- Manage the cache
- Manage the indexers
- Configure and run cron
- Code compiler
- Set the Magento mode
- URN highlighter
- Dependency reports
- Translation dictionaries and language packages
- Deploy static view files
- Create symlinks to LESS files
- Run unit tests
- Convert layout XML files
- Generate data for performance testing