Magento Update Using SSH

Had to update a Magento store today, always forget how to do this so here is a reminder. Magento OS Store http://magentocommerce.com. This is best done using ssh

Log into ssh

ssh -2 X.X.X.X -p 22 -l YOURUSENAME

Switch to the directory your Magento files are in, mine are usually in the public_html folder

I find it best to use these commands

chmod 550 mage

./mage mage-setup .
./mage install community Mage_All_Latest
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

You can also run

./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force

The above should update your core files, then run

./mage upgrade-all
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

To update Magento and also all currently installed extensions ~ The above may just work on its own but I think it is better to upgrade the core files first. now run

rm -rf var/cache/*

To clear your cache directory out after an upgrade:

Run the below to reset all files to the correct permissions

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

If you see the Service Temporarily Unavailable page after refreshing the frontend, open the Magento installation directory on the server and remove the maintenance.flag file.

Then run

rm -rf var/cache/*

To clear the cache

just upgraded to Magento ver. 1.6.1.0


As well as trying the above do look at the magento site for answers and I also found this

http://www.expertmagentodevelopers.com/blog/magento-1-6-upgrade-errors-w...