Uprading in Magento has never been an easy task for me. But this time I successfully upgraded the Magento(from 126.96.36.199 to 188.8.131.52) with minimum no of tries. And I’m going to share the success story
First, I tried with the following series of SSH commands but unluckily didn’t work for me:
rm -rf var/cache var/session rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* rm -f downloader/pearlib/pear.ini chmod 550 ./mage ./mage mage-setup . ./mage config-set preferred_state stable ./mage list-installed ./mage list-upgrades ./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force php shell/indexer.php reindexall
I went through all the above steps successfully but when i tried to logout and re-login at the backend, version number didn’t change in the admin footer. It means there was no effect of above code at least for me.
After that I tried the following SSH commands:
rm -rf var/cache/* var/session/* rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* rm -f downloader/pearlib/pear.ini wget http://www.magentocommerce.com/downloads/assets/184.108.40.206/220.127.116.11-18.104.22.168.diff.gz zcat 22.214.171.124-126.96.36.199.diff.gz > 188.8.131.52-184.108.40.206.diff patch -p0 -f < 220.127.116.11-18.104.22.168.diff
– Deleting pear.ini is important in case If you have copied the same magento from another location. Else updates will be installed in your source location instead of current location.
– You need to run the above commands from the root of your Magento installation.
After successfully applying the above commands, I refreshed the magento page but got the following error:
“Error in file: “…/app/code/core/Mage/Sales/sql/sales_setup/upgrade-22.214.171.124-126.96.36.199.php” – SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘sales_order_aggregated_updated’ already exists”
and this error was easily removed just by renaming the following file:
Besides i didn’t get any error and hence upgrading Magento task was successfull.
This is the first time i upgraded via applying the .diff file and was so happy that it worked for me