How to upgrade Magento 1 using SSH CLI Print

  • magento, magento 1, cli, php, upgrade, stable, maintenance.flag, backup, backups, ssh, updater, update, cache, magento 1.7, magento 1.8, magento 1.9, magento stable
  • 2

This is an easy and quick upgrade guide for updating Magento 1.7, 1.8 and 1.9 to Magento 1.9.x. While the upgrade is largely risk-free, please note we accept no responsibility for any negative, damaging or otherwise impactful repercussions from the instructions in this guide. Follow at your own risk and excise caution. If you are unsure, seek help from a Magento Certified developer.

1. Create a full website backup! Make a copy of all your Magento installation files, and database, in case something goes wrong.
2. Login to the SSH using the user credentails of your Magento account
3. Follow the below commands:

cd ~/public_html/
touch maintenance.flag
chmod +x pear
chmod +x mage
chmod 750 mage
./pear mage-setup .
./pear upgrade -f magento-core/Mage_All_Latest-stable
./mage config-set preferred_state stable
./mage sync
./mage upgrade-all --force
php shell/indexer.php reindexall
rm -rf downloader/.cache/ var/cache/
./n98-magerun.phar cache:flush
rm -rf maintenance.flag

NB  if you experience any problems or errors running "./mage upgrade-all --force", you may have luck with this command instead:
./mage install Mage_All_Latest --force

Was this answer helpful?

« Back