Upgrading Magento Via SSH with PEAR

Last modified by Ryan Lynx on Wed, July 13, 2011 09:13
Source|Old Revisions  |  Back To Group

The following commands work for any hosting environment, but it’s primarily for users that are in an environment with no suEXEC, like one where PHP is running as an Apache module.

In this kind of environment, all web-based processes are owned by user nobody, unlike an environment with suEXEC, where these are owned by the user.

WARNING!

If you copy magento into another location (to make and test an upgrade), rerun

  1. ./mage mage-setup

into new directory, else, updates will be instaled on old location

Once you’ve accessed your site via SSH, change in to the directory where Magento is installed.

Run the following commands to upgrade Magento and core extensions:

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

To update Magento and also all currently installed extensions:

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

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

  1. ./mage mage-setup .
  2. ./mage install community Mage_All_Latest
  3.  
  4. rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

This is only required once, after it’s initialized you don’t need to do this again and can use the first command listed in this article.

You also might need to clear your cache directory out after an upgrade:

  1. rm -rf var/cache/*

Please see our related article on Installing Extensions Via SSH.




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs