Magento recommends a web based upgrade procedure. Upgrading through git is not recommended for production envs, as Alan Kent states below.

However, with the recommended /pub as docroot, the web update code is unavailable. What is the recommended way to upgrade through CLI?

I took the composer.json from the 2.0.1 tag and ran composer update --no-dev but it fails with:

  Source /var/www/magento2/vendor/magento/magento2-base/dev/tests/integration/.gitignore does not exist  
  • I have a very similar question / scenario. If we originally installed from the tar.gz for 2.0.0, but set the web root to /pub, this disables the web based admin update path. Do we just download the 2.0.1.tar.gz file, untar over the 2.0.0 install, run "magento setup:upgrade" and flush caches to upgrade to 2.0.1? Or is there another way to do this? Docs don't discuss this issue it seems. Jan 21, 2016 at 19:00
  • 1
    You should be able to do a "composer update". The ZIP file is just a shortcut of doing this for you, for when installing on say a hosting partner where you don't get command line access. Do not untar the new tar file "over the top of the old one" as this won't delete old files. You can delete the old directory tree and unzip the new one if you want to. But "composer update" should have work.
    – Alan Kent
    Jan 21, 2016 at 20:52
  • Got it. I guess the bug with the "composer update" after adjusting the composer.json version number made me think this was not a viable way to go. Please update us once the bug is investigated. Jan 21, 2016 at 21:12

3 Answers 3


First, it could be a bug - I just got the same problem from the CLI. I am still investigating.

But I wanted to respond to the other part of your email which talks about "how should it work".

We only recommend using git clone if you want to contribute to the code base - that is, create a pull request. We never recommend it for production sites. There is no guaranteed upgrade process for people using Git, partly because someone could grab any version of any branch - we don't guarantee upgrade paths between all possible git checkout's that could happen. It gets too hard.

What we recommend for a production site is to have a composer.json that references the "product" metapackage. For CE,

"require": {
    "magento/product-community-edition": "2.0.1",

This way you only have to update that one patch number and get everything pulled in. There is a similar file for enterprise edition. Doing a "composer update" should work if you change the "2.0.0" to "2.0.1".

It is not recommend to copy our "composer.json" file from the root of the GitHub repo. That is not what we recommend build projects from. That is used for developers who want to contribute to the code base. (We have a deployment script that tweaks this file into the "product-community-edition" metapackage.)

  • Thanks Alan. I did install the sample data, that might affect it.
    – Willem
    Jan 22, 2016 at 10:30
  • I also have sample data installed, but following the compser update after changing the version in the .jon I recieve the following error: "[ErrorException] Source /home/dev/git/mysite/vendor/magento/magento2-base/app/design/frontend/Magento does not exist"
    – tecjam
    Jan 25, 2016 at 14:08

ok, had a stock 2.0.0 install using tar.gz install method, using sample data, with web root set to /pub.

I edited composer.json, and update 2.0.0 to 2.0.1 for the edition. On initial "composer update", this error appeared:

Source /home/xxx/www/vendor/magento/magento2-base/dev/tests/integration/.gitignore does not exist

I ran the following commands to get rid of the rest of the errors each time I ran "composer update":

touch vendor/magento/magento2-base/dev/tests/js/JsTestDriver/.gitignore
touch vendor/magento/magento2-base/dev/tests/api-functional/.gitignore
touch vendor/magento/magento2-base/dev/tests/unit/.gitignore
touch vendor/magento/magento2-base/dev/tests/static/.gitignore
touch vendor/magento/magento2-base/dev/tests/integration/.gitignore
touch vendor/magento/magento2-base/dev/tests/functional/.gitignore
mkdir dev/tests/integration/tmp

This allowed composer update to complete. Then I ran:

bin/magento setup:upgrade
bin/magento cache:flush

and it successfully updated to 2.0.1.


I tried this on on one of my testinstallations after upgrade failed and it worked. But only follow this if you have the tar.gz installation.

First I renamed my magento2 directory to magento2-bad.

mv magento2 magento2-bad

made a new directory for magento2.

mkdir magento2

uploaded Magento-CE-2.0.1-2016-01-20-02-11-21.tar.gz to my new directory, entered the directory and extracted the files.

cd magento2
tar -zxf Magento-CE-2.0.1-2016-01-20-02-11-21.tar.gz

then i copied configuration and media files from the old bad installation.

cp ../magento2-bad/app/etc/config.php app/etc/config.php
cp ../magento2-bad/app/etc/env.php app/etc/env.php
cp ../magento2-bad/.htaccess .htaccess
cp -rf ../magento2-bad/pub/media/* pub/media

then i copied my custom modules (in the tar.gz version i had to create the code directory first).

mkdir app/code

and then copy my modules

cp -rf ../magento2-old/app/code/* app/code

I didnt have any theme in this installation but i suppose that it's possible to just copy them as well. Ex:

cp from magento2-bad/app/design/frontend/<Vendor>/* to app/design/frontend/<Vendor>

Then i set the file owner and right and ran upgrade.

sudo chown -R [fileuser]:apache .
sudo chmod -R 770 .
sudo find . -type f -exec chmod 660 {} \;
./bin/magento setup:upgrade

And now it seem to work ok.

I do have more installations to upgrade so i'm waiting to see what happening from the magento team

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.