0

I want to upgrade Magento from version 1.5.0.1 to 1.7.0.2. How can I do this upgrade manually or via any other method?

1

2 Answers 2

3

Ugh, just no!

This is how I do it - I use command line stuff, so you need to be logged in via ssh or similar, have write access to the files and be in the document root.

  1. Go through all of your extensions and ensure that there is a version available for the current Magento release.

  2. Take a backup, and load it on a dev server, updating hosts/DNS as necessary. ( this is so I can test the upgrade before going live! ).

  3. Update all extensions to support 1.7.0.2 ( this is for the first attempt. If the process fails, then I will disable all extensions and retry ).
  4. Disable and clear cache, and re-index the database.

    If on 1.4 or earlier. ( note the filter on output for old php with 5.3+ )

    ./pear mage-setup . 2>&1 | egrep -v '^$|Undefined|Function|deprecated'
    ./pear channel-update pear.php.net 2>&1 | egrep -v '^$|Undefined|Function|deprecated'
    ./pear install --force PEAR 2>&1 | egrep -v '^$|Undefined|Function|deprecated'
    ./pear install magento-core/Mage_All_Latest  2>&1 | egrep -v '^$|Undefined|Function|deprecated'
    
    rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
    

    Restart your web server, then access the home page, and wait until the system load has dropped back down and the home page is displayed. This will have completed the upgrade to final 1.4.2.0. I manually rebuild the indexes at this time to confirm all is ok.

    php shell/indexer.php reindexall
    
  5. Upgrading 1.4.2.0 or higher to 1.7.

    chmod +x mage
    ./mage mage-setup .
    ./mage sync
    ./mage config-set preferred_state stable
    ./mage upgrade-all
    
  6. As above, restart web server, and reindex.

    If you're extremely lucky, the prevailing wind direction is ESE, and you sacrificed the correct type of virgin to your preferred $deity, all will be working fine, and you can proceed to

  7. Test, test, test.

It's far more likely that you'll be making stock installs of various versions of Magento, and running the

magento-db-repair-tool-1.1.php

on a regular basis.

Once you've managed a successful upgrade in private, you can stick the production site into maintenance mode, and use the notes you created to do it for real.

Good luck!

Steve

2
  • I recommend to start the upgrade-scripts from the console: php index.php Commented Apr 7, 2013 at 1:52
  • Your answer is good for the question, but in #5 you say "Upgrading 1.4.2.0 or higher to 1.7". That is incorrect. You are telling how to upgrade to the latest version, not to 1.7. Nowhere is the version to upgrade to specified. Is there some way to do that? I need to upgrade to 1.7.0.2 specifically. Commented Dec 10, 2014 at 2:49
0

If you want to upgrade in manual mode just download and extract contents from archive http://www.magentocommerce.com/downloads/assets/1.7.0.2/magento-1.7.0.2.tar.gz and copy all folders and files over your site.

The best way should be:

 1. copy your installation for example siteA -> siteA.bck
 2. copy new files in siteA.bck
 3. make backup of DB
 4. rename folder siteA in siteA.old and siteA.bck in siteA
 5. open you site

If something goes wrong Restore db Dump, rename siteA.old back to siteA, investigate the problem.

1
  • You should also deactivate cache and check if there are any upgrade scripts, you can or should execute manually.
    – Tobias
    Commented Apr 6, 2013 at 11:17

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