To upgrade the magento from 1.3.x ,1.4.x to 1.5.x or 1.6.x:
Take the backup of the site and database
Download the magento
$ wget http://www.magentocommerce.com/downloads/assets/1.5.1.0/magento-1.5.1.0.tar.gz
Extract it
$ tar xvfz magento-1.5.1.0.tar.gz
Flush Cache
$ rm -rf var/cache/*
$ rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
Remove the ‘downloader’ and ‘app/design/frontend/base’ directory
$ rm -rf downloader
$ rm -rf app/design/frontend/base
Copy ‘downloader’ and ‘app/design/frontend/base’ folder from magento-1.5.1.0
$ cp -a magento/downloader .
$ cp -a magento/app/design/frontend/base/ app/design/frontend/
$ cp magento/mage .
$ chmod 550 ./mage
Upgrade now :
$ ./mage mage-setup .
$ ./mage sync –force
$ ./mage install http://connect20.magentocommerce.com/community Mage_All_Latest –force
$ rm -rf var/cache/* var/session/*
$ rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
$ chmod 755 mage
$ php shell/indexer.php reindexall
$ ./mage upgrade-all –force
( NOTE: you may skip this ‘upgrade-all’ step if you just went ahead and did the following:
$ yes | cp -Rf magento/* . #this copies over all the magento files you extracted over your current installation
-----
To know more about the upgrade , follow this link:
Upgrade magento