Magento upgrade to 1.7

Upgrading Magento Commerce 1.4, 1.5 and 1.6 to 1.7

Magento is a pretty complex program that hasn’t an easy upgrading solution. Because following the standard guides gives quite a lot of errors, I wrote my own upgrade guide with thanks to Duntuk.com and Turnkeye.

For versions lower than 1.4.2, you’d first have to follow the steps from Turnkeye for lower versions.

Pre-upgrading steps

  • MAKE A BACKUP!
  • Install a fresh install of Magento on a subdirectory or other host on a new database (don’t overwrite your own version of course).
  • With the db repair tool from Magento you can compare your own database versus the fresh database you just installed. The db repair tool looks for errors in the database and can upgrade them.
  • Open SSH and remove your cache:
    rm -rf var/cache/*
    rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

Upgrading steps

  • Chmod the mage file: $ chmod 550 ./mage
  • Upgrade the site (according to Duntuk and Turnkeye):$ ./mage mage-setup .
    $ ./mage sync --force
    $ ./mage list-upgrades #(in order to see if there are upgrades)
    $ ./mage config-set preferred_state stable
  • Start the upgrade
    $ ./mage upgrade-all --force
  • If the upgrade is finished you'll see rows like:
    Package upgraded: community/Mage_Locale_en_US 1.7.0.2
  • Remove cache and sessions
    $ rm -rf var/cache/* var/session/*
    $ rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
  • Visit the homepage which will trigger the upgrade process. It can take up to 30 minutes. By doing it by SSH safes memory:
    $ php -f index.php
  • Sometimes it’s safer to trigger the index.php multiple times until it gives a blank return
  • Than visit the admin and make sure the version number is the number of the upgraded version

Aftercare

Reindex the website if the upgrade is succesful:

$ php shell/indexer.php reindexall

Set all the permissions back:

$ find . -type f -exec chmod 644 {} \;
$ find . -type d -exec chmod 777 {} \;

$ chmod 755 mage
$ chmod o+w var var/.htaccess app/etc
$ chmod -R o+w media
$ chmod -R 777 var/package var/locks var/report var/export downloader

Hopefully your site is upgraded now! If you’ve any questions respond below!

Issues

Error: Mage registry key “_resource_helper/core” already exists

rm -rf var/session/*
rm -rf var/cache/*

If that doesn’t work restart caching tools like Memcached!

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish
Scroll to Top