Here we are discussing Magento 2 version upgrade by using the command line.
For this, we need the ssh access and log in with the username-password and go to root directory and where Magento 2 is installed.
Then we need to run below commands one by one :
composer require magento/product-community-edition 2.3.4 --no-update composer update rm -rf var/di var/generation php bin/magento setup:upgrade php bin/magento setup:di:compile php -dmemory_limit=2G bin/magento setup:static-content:deploy php bin/magento indexer:reindex php bin/magento cache:flush php bin/magento cache:clean
Here It will get upgraded to 2.3.4 version of Magento 2, we can change this to the latest version and add apply that command in ssh
After apply commands we can check our Magento version with the following command:
php bin/magento –version
That’s it. After performing all above steps, Magento will get upgraded to latest version with the upgraded source.

