Monday, 20 December 2010

Upgrade Magento 1.4.1 to 1.4.2.0 from SSH

We have succeeded upgrading our magento templates for Magento 1.4.2.0 compliant, so we think we should share to everybody the simple ways. Our solution requires you have SSH access.

First, We had to upgrade magento source code to latest 1.4.2.0 version. Go to your magento folder, clean up the pear folders:

./pear mage-setup
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

Update pear channel and upgrade PEAR to version 1.9.1

./pear channel-update pear.php.net
./pear upgrade --force PEAR

If it produces error, just run again:

./pear upgrade --force PEAR

Now upgrade Magento:

./pear upgrade magento-core/Mage_All_Latest

After upgraded successfully magento source code to 1.4.2.0, we upgrade our themes by comparing our themes' directories with the base/ directory to learn what differences between our themes' source codes and magento source code. Since our magento theme's code are mostly identical the old magento source code, so we easily determined the differences and upgraded our theme's code.

Since we use Subversion to store our source code, we have to exclude the temporary files out of our SVN repository, we run follow command:

svn ps svn:ignore "pear.ini" downloader/pearlib
svn ps svn:ignore "*" downloader/pearlib/cache downloader/pearlib/download build/ var/

We hope this article help you upgrade your Magento store successful. If you have better idea we'd like to learn from you :-)