Skip to content

Latest commit

 

History

History
136 lines (116 loc) · 6.81 KB

config-cli-subcommands.md

File metadata and controls

136 lines (116 loc) · 6.81 KB
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
Configuration
System
Setup

Before you configure the Magento application {#config-install-cli-prereq}

{% include install/before-you-begin-cli.md %}

First steps {#config-cli-before}

  1. Log in to the Magento server as, or switch to, the Magento file system owner.

  2. 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
You can run the commands in any of the following ways:
  • php magento <command>
  • ./magento <command>
  • magento <command> (after adding{:target="_blank"} <your Magento install dir>/bin to your system PATH)

Command summary {#config-cli-summary}

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

Help commands {#config-cli-help}

{% include install/cli_help-commands.md %}

Common arguments {#config-cli-subcommands-common}

{% include install/cli_common-commands.md %}

Commands {#config-cli-subcommands}

The following sections discuss the available commands.