|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +group: install_cli |
| 4 | +subgroup: 05_Command-line installation |
| 5 | +title: Update the Magento database schema and data |
| 6 | +menu_title: Update the Magento database schema and data |
| 7 | +menu_node: |
| 8 | +menu_order: 16 |
| 9 | +version: 2.0 |
| 10 | +github_link: install-gde/install/cli/install-cli-subcommands-db-upgr.md |
| 11 | +--- |
| 12 | + |
| 13 | +<h4>Contents</h4> |
| 14 | + |
| 15 | +See one of the following sections: |
| 16 | + |
| 17 | +* <a href="#instgde-install-cli-first">First steps</a> |
| 18 | +* <a href="#instgde-cli-subcommands-maint-prereq">Prerequisites</a> |
| 19 | +* [Upgrade the Magento database schema and data](#instgde-cli-db-upgr) |
| 20 | + |
| 21 | +<h2 id="instgde-cli-before">First steps</h2> |
| 22 | +{% include install/first-steps-cli.html %} |
| 23 | +In addition to the command arguments discussed here, see <a href="{{page.baseurl}}install-gde/install/cli/install-cli-subcommands.html#instgde-cli-subcommands-common">Common arguments</a>. |
| 24 | + |
| 25 | +<h2 id="instgde-cli-subcommands-maint-prereq">Prerequisites</h2> |
| 26 | +Before you use this command, you must <a href="{{page.baseurl}}install-gde/install/cli/install-cli-install.html">install the Magento software</a>. |
| 27 | + |
| 28 | +## Upgrade the Magento database schema and data {#instgde-cli-db-upgr} |
| 29 | +Anytime you perform an action that causes the Magento database schema or data to change, you must update them by running the command discussed in this section. A partial list of reasons follows: |
| 30 | + |
| 31 | +* You upgraded the Magento software using the command line |
| 32 | +* You installed or updated a component using the command line |
| 33 | +* You enabled or disabled a component |
| 34 | + |
| 35 | +Note the following: |
| 36 | + |
| 37 | +* If you used the Web Setup Wizard to do any of the preceding, you don't have to use the command discussed in this topic. |
| 38 | +* A Magento *component* can be a module, theme, or language pack; it doesn't matter whether the component comes from the Magento Marketplace or not |
| 39 | + |
| 40 | +Command usage: |
| 41 | + |
| 42 | + magento setup:upgrade [--keep-generated] |
| 43 | + |
| 44 | +where `--keep-generated` is an optional argument that does not update [static view files]({{ page.baseurl }}config-guide/cli/config-cli-subcommands-static-view.html). This optional argument is for use *only* in limited circumstances by experienced system integrators. It should be used *only* in [production mode]({{ page.baseurl }}config-guide/bootstrap/magento-modes.html#mode-production). It should *not* be used in [developer mode]({{ page.baseurl }}config-guide/bootstrap/magento-modes.html#mode-developer). |
| 45 | + |
| 46 | +#### Related topics |
| 47 | + |
| 48 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-install.html">Installing the Magento software using the command line</a> |
| 49 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-subcommands-enable.html">Enable or disable modules</a> |
| 50 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-uninstall-mods.html">Uninstall modules</a> |
| 51 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-subcommands-deployment.html">Create the deployment configuration</a> |
| 52 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-subcommands-db.html">Create the Magento database schema</a> |
| 53 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-subcommands-store.html">Configure the store</a> |
| 54 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-subcommands-admin.html">Create a Magento administrator</a> |
| 55 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-backup.html">Back up the file system, media, and database</a> |
| 56 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-theme-uninstall.html">Uninstall themes</a> |
| 57 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-uninstall-langpk.html">Uninstall language packages</a> |
| 58 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-uninstall.html#instgde-install-uninstall">Uninstall the Magento software</a> |
| 59 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-uninstall.html#instgde-install-magento-update">Update the Magento software</a> |
| 60 | +* <a href="{{page.baseurl}}install-gde/install/cli/install-cli-uninstall.html#instgde-install-magento-reinstall">Reinstall the Magento software</a> |
0 commit comments