This tutorial will explain how to upgrade and old magento version 18.104.22.168 to latest version (22.214.171.124 at the time of writing). Since Magento database structure has major changes from version 126.96.36.199 to 1.4.2 the best approach would be to first upgrade to version 1.4.2 and then directly to 188.8.131.52. This tutorial assumes that you have SSH access to your Magento server.
Page 1 - Upgrading to version 1.4.2
As mentioned above we will first update Magento version 184.108.40.206 to 1.4.2. According to some board discutions from stackoverflow.com, you should substitute the file downloader/pearlib/php/Archive/Tar.php with the patched version available here: Tar.zip
Before starting the upgrade procedures make sure you have a backup of your Magento files and database, just in case something goes wrong and the site gets broken. Next connect to your server SSH and go to your store folder to execute the following commands. It is possible that you will see warnings about some deprecated functions (nothing to worry about).
If you work on SSH with root user you will have to chown the upgraded files to correct user:group, otherwise you will see 500 server error.
Make folder lib/PEAR writable (recursively):
chmod -R 777 lib/PEAR
Prepare Magento for upgrade (first set the appropriate permissions on the pear file):
chmod 550 pear
If the pear file was last saved from a Windows system you most likely will get an error like: ./pear: /bin/sh^M: bad interpreter: No such file or directory. That's because of the Miscrosoft-style line feeds, which sometimes causes issues on unix type servers. To fix it run the following command (perl must be installed on the server):
perl -pi -e 's/\r\n/\n/g' pear
The result of the above command will most likely be:
Channel "connect.magentocommerce.com/community" is already initialized
Execute Magento upgrade:
./pear upgrade -f magento-core/Mage_All_Latest-stable
Output of the command will show the upgrated packages, something like:
upgrade ok: channel://connect.magentocommerce.com/core/Mage_All_Latest-220.127.116.11
Next run these commands:
chmod 550 ./mage
./mage mage-setup .
* notice the dot after mage-setup command
Output (Magento connect 2.0 channel was added to the channels list):
Successfully added: http://connect20.magentocommerce.com/community
Output, something like:
Successfully added: community/Mage_Core_Modules-18.104.22.168
To complete the upgrade to version 1.4.2 do the following:
- Empty var/cache
- Empty var/session
- Empty browser cache
- Visit your website to trigger the upgrade (the site will take some time to open for the first time, so don't close the page until the homepage has loaded)
If you see 500 Internal Server Error on your website you need to chown the site files to correct user:group (this usually happens when working on SSH with a root account):
chown -R your_user:your_group .
* notice the dot at the end
If the above command didn't fixed 500 Internal Server Error, some of your files might have wrong permissions. Fix it by setting 644 to all files:
find . -type f -print0 | xargs -0 chmod 644
If everything worked fine you should now have Magento version 1.4.2 (you can see the version in admin panel's footer). We can proceed now to upgrade to version 22.214.171.124: