Currently i have a Magento ver 2.2.8 now I want to upgrade my Magento version to Magento ver. 2.3.2 so I want to know about what will be the best approach to achieve this smoothly.
2 Answers
Command Line Upgrade is always Preferable:
Step 1: Backup the existing composer.json file in the Magento installation directory.
Step 2: Remove any unnecessary packages before upgrading to Magento 2.3.2.
composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-updateStep 3: Then you need to deactivate the Magento Open Source update.
composer remove magento/product-community-edition --no-updateStep 4: Indicate to Magento 2.3.2
composer require magento/product-enterprise-edition=2.3.2 --no-updateStep 5: Open composer.json and edit the “autoload”
"autoload": { "psr-4": { "Magento\\Framework\\": "lib/internal/Magento/Framework/", "Magento\\Setup\\": "setup/src/Magento/Setup/", "Magento\\": "app/code/Magento/", "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/" }, ... }Step 6: Modify the Magento updater
You need to modify the Magento updater if it is installed (which located in /update). First, you need to backup and remove the old updater. Then, create a Composer project.
composer create-project --repository=https://repo.magento.com magento/project-enterprise-edition=2.3.2 temp_dir --no-installStep 7: Check metadata in “name“, “version“, and “description” fields in the /composer.json file. If everything is okay, apply update.
composer updateStep 8: Clear caches and generated content
rm -rf <Magento install dir>/var/cache/* rm -rf <Magento install dir>/var/page_cache/* rm -rf <Magento install dir>/generated/code/*Step 9: Update the database schema and data
php bin/magento setup:upgradeStep 10: Disable maintenance mode
php bin/magento maintenance:disableStep 11: Restart Varnish
service varnish restartHope this will help You!!
- For Enterprise VersionOscprofessionals– Oscprofessionals2019-09-25 08:02:30 +00:00Commented Sep 25, 2019 at 8:02
- I would do this in a separate git branch, tar.gz ./vendor directory and dump database for safe measure in case you ever want to revert back.Danny Z– Danny Z2019-10-01 17:23:16 +00:00Commented Oct 1, 2019 at 17:23
You can upgrade your Magento application from the command line
php bin/magento maintenance:enable composer require magento/product-enterprise-edition=2.3.2 --no-update Specify additional packages
composer require --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.13.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~1.0.0 magento/magento2-functional-testing-framework:~2.3.14 pdepend/pdepend:2.5.2 phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.3.1 --sort-packages --no-update Remove unused packages
composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update Update autoload
Open composer.json and edit the "autoload": "psr-4" section to include "Zend\Mvc\Controller\": "setup/src/Zend/Mvc/Controller/":
"autoload": { "psr-4": { "Magento\\Framework\\": "lib/internal/Magento/Framework/", "Magento\\Setup\\": "setup/src/Magento/Setup/", "Magento\\": "app/code/Magento/", "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/" }, //... } Remove the old update/ directory and move temp_dir/update/ to the update/ directory:
rm -rf update mv temp_dir/update . rm -rf temp_dir Apply updates
composer update rm -rf var/cache/ rm -rf var/page_cache/ rm -rf var/generation/ php bin/magento setup:upgrade php bin/magento maintenance:disable For more details: https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html
- composer require magento/product-enterprise-edition=2.3.2 --no-update . This command only different from community editionArunprabakaran M– Arunprabakaran M2019-09-25 08:08:00 +00:00Commented Sep 25, 2019 at 8:08