Upgrading your Magento installation with our script, which makes the upgrade process semi-automated, is the preferred method.
Use the manual process if you previously made updates to the same values that the upgrade script affects, because the script will override those values.
The upgrade script:
- Updates Magento with the 2.3 requirements.
- Backs up the
- Specifies the new version of the Magento metapackage.
- Updates the
"require-dev"section in the
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"to the
"autoload":"psr-4"section in the
- Backs up and updates the
magento/updater, if it has been installed.
- Updates the
"description"fields in the
Before you begin
Refer to Prerequisites.
If you need to upgrade PHP, do it before you run the script.
Download the script
Download, or copy, the script file from the
Show script options
1 php -f pre_composer_update_2.3.php -- --help
Run the script
1 php -f pre_composer_update_2.3.php -- --root='<path/to/magento/install/dir>' --repo=https://repo.magento.com/ <options>
1 composer update
Clear caches and generated content
1 rm -rf <Magento install dir>/var/cache/*
1 rm -rf <Magento install dir>/var/page_cache/*
1 rm -rf <Magento install dir>/generated/code/*
1 rm -rf <Magento install dir>/generated/metadata/*
If you use cache storage other than the filesystem, such as Redis or Memcached, you must manually clear the cache there too.
Update the database schema and data
1 bin/magento setup:upgrade
Disable maintenance mode
1 bin/magento maintenance:disable
Optional—If you use Varnish for page caching, restart it:
1 service varnish restart
Check your work
Open your storefront URL in a web browser to check whether the upgrade was successful. If your upgrade was unsuccessful, your storefront will not load properly.
If the application fails with a
We're sorry, an error has occurred while generating this email. error:
- Reset file system ownership and permissions as a user with
- Clear these directories:
- Check your storefront in your web browser again.