I'm in live, need to upgrade Magento 2.3.1 to 2.3.3. Please let me know, how to upgrade this version without any disturbance of my website.
3 Answers
Please take your database & code backup first after that performs an update task.
Connect Your SSH and then go to your project root and run below command
composer require magento/product-community-edition 2.3.3 --no-update
After that run
composer update
Once this command execution is completed run reindexer and cache command.
You can read detail info here: https://www.mageplaza.com/devdocs/upgrade-magento-2.html
above steps working fine, otherwise follow these step by step (Manually):
cp composer.json composer.json.bak
cp composer.lock composer.lock.bak
Update in Composer.json -> 2.3.1 to 2.3.3
and changes in Composer.lock (2.3.1 -> 2.3.3)
php bin/magento maintenance:status
php bin/magento maintenance:enable
3) composer update
4) rm -rf var/ pub/static/ generated/*
5) php bin/magento setup:upgrade
6) php bin/magento setup:di:compile
6) php bin/magento setup:static-content:deploy -f
8) php bin/magento cache:clean
9) php bin/magento cache:flush
10) php bin/magento indexer:reindex
php bin/magento maintenance:disable
Hope this will help.
-
1Doing that directly on the production environment is extremely irresponsible.– ŁukaszCommented Dec 17, 2019 at 12:06
-
Hi, when i run "setup:di:compile" i;m fashing error in "Fatal error: Declarati on of (Magento\GraphQl\Model\Query\ ContextInterface $context, Magento\Quote\Api\Data\CartInterface $cart, array $shippingAddressesInput): void in /opt /bitnami/apps/magento/htdocs/vendor/magento/module-quote-graph-ql/Model/Cart/SetShippingAddressOnCart.php on line 2 0"– PriyaCommented Dec 19, 2019 at 7:25
-
@Priya, Backup and delete the file /vendor/magento/module-quote-graph-ql/Model/Cart/SetShippingAddressOnCart.php Commented Dec 19, 2019 at 7:55
-
-
Yeah @sanjay. Now it's working. In future if we face any problem in "SetShippingAddressOnCart.php" file. because it's deleted– PriyaCommented Dec 19, 2019 at 8:46
- Download Magento latest version.
- copy composer.json file.
- and replace your composer.json file
- run composer update command
-
1this is too complex, too many external operations, just run 2 composer commands...– MagenXCommented Dec 20, 2019 at 9:21
First backup from all of your data
- Log in to the Magento Admin as administrator.
- Navigate System > Tools > Web Setup Wizard.
- Click System Configuration.
Check your authentication keys in the provided fields if possible. Below is an example if you have already entered your keys.
- Click Save Config.
- Click System Upgrade.
Then, you need Magento to check the readiness. If you want to add other components, simply click Yes.
- After that, you are ready to upgrade to Magento 2.3. Select versions to upgrade.
Or Try the CLI update process:
- On your terminal go into magento root folder.
- Set magento 2 under maintenance mode.
php bin/magento maintenance:enable
- Search for the correct and latest magento 2 version
composer show magento/product-community-edition 2.3.* --all | grep -m 1 versions
- Force your composer to use the latest version
composer require magento/product-community-edition=2.3.3 --no-update
- Update your magento 2 installation
composer update
- After successful update Upgrade magento and compile
php bin/magento setup:upgrade
bin/magento setup:di:compile
- Disable maintenance mode and you are ready to check the correct version
php bin/magento maintenance:disable