• 20Gb Disk Space
  • Unmetered Bandwidth
  • Free Website Transfer
  • Free Script Installation
  • Unique Control Panel
  • 24/7 Professional Support
Sign Up

Tutorials

Magento Tutorial





























































Magento HOWTOs

Magento Hosting

Magento Upgrade Tutorial

How to upgrade Magento using the pear/mage tool

In this tutorial we will show you how to upgrade your Magento from 1.4 to 1.5 using the pear/mage command line tool provided by Magento. To be able to upgrade your Magento this way, you need to have SSH access to your web hosting account.

As part of the HostKnox Magento hosting services, all HostKnox customers have free SSH access to their hosting accounts and can upgrade Magento following these instructions.

HostKnox offers an exclusive service - free Magento upgrade with every annual web hosting account.

The first and most important step in any application upgrade is creating a backup of your files and database. This way you will be able to restore your site if the upgrade does not complete successfully.

In versions up to 1.4, the Magento command line tool is called pear. In Magento 1.5 this tool has been renamed to mage. So the first thing you need to do is upgrade pear to mage. To do this, you need to cd (change directory) to your Magento installation folder.

For example, if your Magento is installed in a folder called store, you need to type the following once you log in to your account via SSH:

cd public_html/store

Then you need to execute this command:

./pear upgrade -f magento-core/Mage_All_Latest-stable

You will see lots of lines notifying you about packages being downloaded. You may also see some warnings and errors, but in most cases you can safely disregard them as they will not disrupt the upgrade process.

Once the packages have been upgraded, you will see upgrade ok messages notifying you that the upgrades have been completed successfully:

Magento pear upgrade ok

You should now have the mage tool available in the Magento installation directory. To be able to use it, you need to make it executable:

chmod 755 mage

Now you can see the available commands by typing:

./mage help

Magento mage help

To be able to use the mage tool, you need to initialize it first. This is done by executing:

./mage mage-setup .

Magento mage setup

The next step is to sync your installed extensions with the new Magento Connect version 2.0. You can do that by executing:

./mage sync

Now you are ready to complete the Magento upgrade. To upgrade your Magento to the latest version, you need to execute:

./mage upgrade-all --force

This will download the latest package versions, upgrading your existing ones and finalizing the Magento upgrade:

Magento Upgrade

Your Magento has been upgraded successfully. You can now go to your store and review the upgraded version. You may need to flush the Magento cache to see the changes.