exp:upgrade
Upgrade the installation in one call: every stage in order (dry run unless --apply).
Script bin/php/upgrade.php, code in kernel/private/classes/commands/upgrade.php. Run it from the installation root, as the user the web server runs as:
./console exp:upgrade --help
php bin/php/upgrade.php --helpHelp text
Upgrade the installation in one call
Runs the stages in their fixed order: code, libraries, database, scripts, finish. Without --apply
it changes nothing and lists, step by step, what it would do. With --apply it makes a backup,
applies the pending steps in order, records each one and stops at the first failure; the finish
stage then deploys the changes and checks that the site answers.
./console exp:upgrade dry run of every stage
./console exp:upgrade --apply
./console exp:upgrade --apply --stages=database,scripts,finish
./console exp:upgrade --format=json the machine output exp-upgrade/1
Exit codes: 0 done or nothing pending, 1 a step failed (or pending with --fail-on-pending),
2 usage error, 3 database not reachable, 4 internal error.
Guide: doc/eng-us/guides/upgrading-with-the-console.mdOptions
| Option | Value | Help |
|---|---|---|
--stages | required | Only these stages, a comma list of code, libraries, database, scripts, finish (in that order) |
--apply | Make the changes (the default is a dry run that lists them and changes nothing) | |
--dry-run | The default, accepted for scripts that pass it: list what would change, change nothing | |
--only | required | Only these steps (step ids, a comma list or repeated); an optional step runs only when named here |
--skip | required | Never these steps (step ids, a comma list or repeated) |
--format | required | text (default) or json (the machine output exp-upgrade/1) |
--no-backup | Write without making a backup first | |
--backup-dir | required | Where the backup goes (default var/backup/upgrade); a directory <time> is made in it |
--force-order | Run a stage although an earlier stage has pending steps | |
--fail-on-pending | Exit 1 when steps are still pending (for CI) | |
--force-no-backup | With --no-backup on a production installation: write without a backup all the same | |
--no-caption | Write without taking a caption first (the same as --no-backup); refused on production without --force-no-caption | |
--force-no-caption | With --no-caption on a production installation: write without a caption all the same | |
--no-deploy | Finish without exp:velocity deploy: extension autoloads and the INI, template and content caches only | |
--url | required | The addresses the smoke check requests after the deploy (a comma list or repeated); default the front page of SiteURL |
--to | required | The code stage moves the checkouts to this tag, branch or commit (default: the upstream of the branch) |
--repos | required | More git checkouts the code stage moves, paths inside the installation (a comma list or repeated) |
--update | required | composer update these packages, with their dependencies (a comma list or repeated) |
--composer | required | The Composer binary or composer.phar (default: composer on the PATH, else composer.phar in the root) |
--no-audit | Skip the security audit of the libraries (composer audit) before and after | |
--allow-vendor-changes | Install the libraries although Composer reports local changes in vendor/ | |
--no-verify | Skip the verification after the upgrade (exp:upgrade:verify --after) | |
--rollback-on-fail | When the upgrade or its verification fails, roll back to the pre-upgrade caption at once | |
--post-caption | After a passed verification, take a post caption: the last known good state | |
--no-tests | Leave the test suite upgrade-smoke out of the verification |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Related
Generated by ./console exp:help:examples from bin/php/upgrade.php, kernel/private/classes/commands/upgrade.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.