0

I initially launched my site using a git clone of magento2 repo. Since then, it appears installing this way is unsupported.

Using git pull and changing git branches I was able to get my site from 2.4.3 to 2.4.4. But now I'm not sure how to get it to 2.4.5 because there is no 2.4.5 branch.

Anyone know how to upgrade 2.4.4 to 2.4.5 when the initial install was a 2.4.3 done via git clone.

1 Answer 1

1

Since you initially installed Magento 2.4.3 using a git clone of the Magento 2 repository, you have a couple of options to upgrade to Magento 2.4.5.

Option 1: Use Composer to update Magento

The recommended way to install and update Magento is by using Composer. If you haven't used Composer to manage your Magento installation before, you'll need to install it first. You can follow the instructions in the Magento documentation to do so.

Once Composer is installed, you can update your Magento installation to 2.4.5 by running the following command in your terminal:

composer require magento/product-community-edition=2.4.5 --no-update

This command will update your composer.json file with the new version of Magento. Now you can run the following command to update your Magento installation:

composer update

Option 2: Use Git to switch branches

If you prefer to continue using Git to manage your Magento installation, you can switch to the Magento 2.4.5 branch by following these steps:

  1. First, make sure you have committed all of your changes to Git and pushed them to your remote repository.
  2. Run git fetch to download the latest changes from the Magento 2 repository.
  3. Run git checkout 2.4-develop to switch to the 2.4-develop branch.
  4. Run git pull to download the latest changes from the 2.4-develop branch.
  5. Run git checkout 2.4.5 to switch to the 2.4.5 tag.
  6. Run git merge origin/2.4.5 to merge the changes from the 2.4.5 tag into your local branch.
  7. Run any necessary commands to update your database, clear your cache, etc.

Note that using Git to manage your Magento installation is not officially supported by Magento, and you may encounter issues or unexpected behavior. It is recommended to use Composer to manage your installation whenever possible.

1
  • I tried many ways, in the end what I got to work is to create new magento project with composer, then copy that composer.json over to my site, delete composer.lock, delete vendor folder, then composer install, then delete directories from app/code design etc that are now stored in vendor by switching to composer. Then a setup:upgrade etc. I did not know how to get to the 2.4.5 tag on github before, thanks for sharing that info.
    – OB7DEV
    Mar 10, 2023 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.