• Applies To: All Services
  • Difficulty: Easy
  • Time Needed: 10 minutes
  • Tools Needed: SSH Client
  • Reading Time: 2 minutes

Once you've accessed your site via SSH, change in to the directory where Magento is installed and run the following commands to upgrade Magento (you should make a backup of your files and database before proceeding):

chmod 550 mage
./mage mage-setup .
./mage config-set preferred_state stable
./mage sync
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
php shell/indexer.php reindexall
rm -rf downloader/.cache/ var/cache/

For Magento 1.4.x and earlier, please use the following commands:

chmod 550 pear
./pear upgrade-all
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* var/cache/

If you receive an error, that means the PEAR registry has not been initialized. You need to run the following commands:

chmod 550 pear
./pear mage-setup .
./pear install magento-core/Mage_All_Latest
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* var/cache/