This is the most comprehensive description of the Magento 1.4 (1.4.1.1), 1.5 (1.5.1.0), 1.6 (1.6.0.0) upgrade process. It contains step-by-step instructions and troubleshooting information. Hope this information will help you to upgrade your Magento store up to the latest version with no troubles.
Prepare for Magento upgrade
Lets imaging that you have Magento 1.4.1.1. web store and you need to upgrade it to 1.5. or 1.6 version. First of all it is highly recommended to backup your live store files and database.
Next you need to get SSH access from your hosting provider and connect to your server via SSH protocol. After connection via SSH go to your store folder and execute these commands:
1 – Change permissions on lib/pear folder to writable (recursively):
chmod -R 777 lib/PEAR
2 – Execute this command to prepare Magento for upgrade:
./pear mage-setup
Most likely you will see this result after command execution:
Channel “connect.magentocommerce.com/core” is already initialized
Upgrade from Magento 1.4.1.x to Magento 1.4.2.0
This step is necessary even if you upgrade your Magento store to 1.5 or 1.6 versions.
3 – Execute Magento upgrade command:
./pear upgrade -f magento-core/Mage_All_Latest-stable
Output of the command will show you what core packages were upgraded:
…
upgrade ok: channel://connect.magentocommerce.com/core/Mage_Centinel-1.4.2.0
upgrade ok: channel://connect.magentocommerce.com/core/Interface_Frontend_Base_Default-1.4.2.0
upgrade ok: channel://connect.magentocommerce.com/core/Phoenix_Moneybookers-1.2.3
upgrade ok: channel://connect.magentocommerce.com/core/Find_Feed-1.0.7
upgrade ok: channel://connect.magentocommerce.com/core/Interface_Adminhtml_Default-1.4.2.0
4 – When this part of the upgrade will be complete, enter these commands:
chmod 550 ./mage
./mage mage-setup .
You will see this result after command execution:
Successfully added: http://connect20.magentocommerce.com/community
It means that Magento connect 2.0 channel was added to the channels list successfully.
5 – Next, enter this command:
./mage sync
The result will be:
…
Successfully added: community/Mage_Locale_en_US-1.4.2.0
Successfully added: community/Interface_Install_Default-1.4.2.0
Successfully added: community/Phoenix_Moneybookers-1.2.3
Successfully added: community/Mage_Downloader-1.5.0.0
Successfully added: community/Lib_Google_Checkout-1.4.2.0
Upgrade to Magento 1.4.2.0 is complete and now you can proceed with upgrade to Magento 1.5.1.0 or 1.6.0.0 version.
Upgrade from Magento 1.4.2.0 to Magento 1.5.10 or Magento 1.6.0.0
Now you can upgrade your store to version 1.5 or 1.6.
Before proceeding with this part of Magento upgrade, it is very important to see to what version Magento upgrade scripts will upgrade your store. Enter this command to check this:
./mage list-upgrades
If you will see this result:
Updates for community:
Mage_All_Latest: 1.4.2.1 => 1.6.0.0
Lib_Js_Mage: 1.4.2.0 => 1.6.0.0
Lib_Varien: 1.4.2.0 => 1.6.0.0
Lib_Phpseclib: 1.4.2.0 => 1.5.0.0
It means that your Magento will be upgraded to version 1.6.0.0. If it is not what you need you can change upgrade channel to “stable” and upgrade your Magento to version 1.5.1.0.
6 – Enter this command to change the upgrade channel to stable:
./mage config-set preferred_state stable
After this the “./mage list-upgrades” command will show you this result:
Updates for community:
Mage_All_Latest: 1.4.2.1 => 1.5.1.0.1
Lib_Js_Mage: 1.4.2.0 => 1.5.1.0
Lib_Varien: 1.4.2.0 => 1.5.1.0
Lib_Phpseclib: 1.4.2.0 => 1.5.0.0
Mage_Core_Adminhtml: 1.4.2.0 => 1.5.1.0
Mage_Core_Modules: 1.4.2.0 => 1.5.1.0
7 – After channel selection you can upgrade your Magento to 1.5.1.0 (or to Magento 1.6.0.0) using this command:
./mage upgrade-all –force
You will see upgraded packages on your screen:
…
Package upgraded: community/Mage_Locale_en_US 1.6.0.0
Package upgraded: community/Lib_Mage 1.6.0.0
Package upgraded: community/Lib_ZF 1.11.1.0
Package upgraded: community/Lib_Js_Prototype 1.7.0.0.1
Package upgraded: community/Lib_ZF_Locale 1.11.1.0
Now the upgrade is complete and you can execute database upgrade visiting your Magento store in your browser. If everything was upgraded correctly, you will see upgraded store in your browser.
You can check version of your store in the footer of Magento administration panel.
Need any help with Magento upgrade?
Turnkeye.com offers professional Magento support services (including Magento development and Magento upgrade service), feel free to contact our team.
Troubleshooting
1 – Magento upgrade script error:
upgrade-all: Please check for sufficient write file permissions.
Error: upgrade-all: Your Magento folder does not have sufficient write permissions, which downloader requires.
Execute this command to correct the error:
chmod -R 777 Upgrade
2 – Magento upgrade script error:
upgrade-all: Invalid stability in compareStabilities argument.
Execute these commands, it will fix the issue:
./mage channel-add connect20.magentocommerce.com/community
./mage channel-add connect20.magentocommerce.com/core
./mage sync
3 – Server error:
“Internal Server Error” instead of Magento storefront page or administration zone pages.
Most likely issue is connected with wrong permissions.
Fix this issue using these recursive commands:
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
4 – Magento error: Different errors in Magento database.
Re-index your database in Magento administration panel and clear Magento cache.
5 – Magento error:
“Invalid mode for clean() method”.
Clear Zend cache (all files, including “Backend” folder) in [magento_folder]/app/code/core/Zend/Cache/
6 – Magento error:
“Call to a member function toHtml() on a non-object in …/Layout.php”.
Open [magento_folder]/app/design/frontend/default/[your_theme]/layout/page.xml and replace this line of the code:
<block type=”core/profiler” output=”toHtml”/>
With:
<block type=”core/profiler” output=”toHtml” name=”core_profiler”/>
7 – Magento error:
“Maximum key size must be smaller 32″.
Clear Magento cache.
Tags: Magento, Magento 1.4. upgrade, Magento 1.5. upgrade, Magento 1.6. upgrade, Magento 1.6.0.0, troubleshooting, upgrade






Great – I hope this works, I’ve been stuck on 1.4.1.1 for ages.
Hi – me again, im new to SSH – do i need to cd into a directory before running these commands?
Hi Chris,
Yes, you need to cd into your Magento directory. I hope you created backup of the original store?
Very useful magento article, i’ve been using this method for a few client websites.
Hi,
Very useful article. Upgrade went smooth and am now on 1.5.1.0.
The only problem I am having is when I try to install the google shopping extension it gives the following errors -
Checking dependencies of packages
Already installed: community/Mage_GoogleShopping 0.3.5, skipping
Already installed: community/Mage_Core_Modules 1.5.1.0, skipping
Installing package community/Lib_Varien 1.6.0.0-rc2
Package community/Lib_Varien 1.6.0.0-rc2 installed successfully
Already installed: community/Lib_Google_Checkout 1.5.0.0, skipping
Already installed: community/Lib_Js_Calendar 1.51.1, skipping
Installing package community/Lib_Js_Mage 1.6.0.0-rc2
Package community/Lib_Js_Mage 1.6.0.0-rc2 installed successfully
Already installed: community/Lib_Phpseclib 1.5.0.0, skipping
Installing package community/Mage_Locale_en_US 1.6.0.0-rc2
Package community/Mage_Locale_en_US 1.6.0.0-rc2 installed successfully
Installing package community/Lib_Mage 1.6.0.0-rc2
Package community/Lib_Mage 1.6.0.0-rc2 installed successfully
Already installed: community/Lib_ZF 1.11.1.0, skipping
Already installed: community/Lib_ZF_Locale 1.11.1.0, skipping
Package installed:
community Lib_Varien 1.6.0.0-rc2
community Lib_Js_Mage 1.6.0.0-rc2
community Mage_Locale_en_US 1.6.0.0-rc2
community Lib_Mage 1.6.0.0-rc2
CONNECT ERROR: Package community/Lib_Js_Prototype 1.7.0.0.1 conflicts with: community/Mage_Core_Modules 1.5.1.0
For some reason it is conflicting with Lib_Js_Prototype 1.7.0.0.1
What version should it be and if you could please tell me how it could be fixed I would appreciate it.
Thanks,
Patrick
Hello,
> CONNECT ERROR: Package community/Lib_Js_Prototype 1.7.0.0.1 conflicts with: community/Mage_Core_Modules 1.5.1.0
It is better to contact our support team regarding this issue: http://turnkeye.com/contact_us.html
Thank you.
I had to clear the cache (rm -rf var/cache) again before visiting your magento store in the browser.
By the way, If you will need to re-index Magento database without admin zone access, use this shell command:
./shell php indexer.php reindexall
thank god I’ve found this article. It really solved my upgrade errors. Thanks Turnkeye
Thanks for putting this guide online — it’s extremely helpful.
I’m upgrading a site from 1.4.0.1 and don’t want to go all the way up to the recently released 1.6.0.0 version. Is it possible to use the mage command to upgrade to 1.5.1.0 instead? Since 1.6 has been released as stable it won’t show up. We’ve got some extensions that aren’t yet certified for the latest version and I don’t want to risk breaking them.
Since the latest stable release of Magento is 1.6, it is not possible to upgrade to 1.5 using ‘stable’ upgrade channel anymore.
Instead you can upgrade your store directly to 1.6 stable version.
Thanks for the response — I expected that was the case. Unfortunately when I run the upgrade command (./mage upgrade-all –force) to go from 1.4.2.1 to 1.6.0 I get the following errors:
PHP Fatal error: Class ‘Mage_Archive’ not found in /path/to/magento/downloader/lib/Mage/Connect/Package/Reader.php on line 85
Error: upgrade-all: Package community/Mage_Downloader 1.6.0.0 conflicts with: community/Mage_All_Latest 1.4.2.1
Starting to download Mage_Downloader-1.6.0.0.tgz …
…done: 264,756 bytes
After that the mage executable disappears and the site will not load. I’d like to use the ssh tools to upgrade our site but I’m beginning to think I’ll need to manually set up a new installation. Any suggestions would be greatly appreciated.
Please make sure that the core of your Magento store is not damaged by 3rd party customizations.
If you need any help with Magento upgrade, please contact us: http://turnkeye.com/contact_us.html
This is a great tutorial to help update your magento version. It is so annoying when you get stuck trying to do the update all your self. Things like this really do help.
don’t upgrade vis extension manager,it will bring much more problems,just copy the new magento1.6 file to overrider the old file,and run a new install,this will have less problems .you only need to change some template files and extensions
I’ve Magento 1.4.1.1 running.
Using this command: pear mage-setup resaults this:
Command ‘mage-setup’ is not valid, try ‘pear help’
And using this command: pear upgrade -f magento-core/Mage_All_Latest-stable resaults this:
Attempting to discover channel “magento-core”…
Attempting fallback to https instead of http on channel “magento-core”…
unknown channel “magento-core” in “magento-core/Mage_All_Latest-stable”
invalid package name/package file “magento-core/Mage_All_Latest-stable”
upgrade failed
Can anyone help me?
Hello Ttc,
Try to run pear mage-setup from your Magento root directory.
Cool, thx. with your manual i made it to 1.6.0.0 at least! If errors encounter when upgrading database just hit your browser again. Took about 30 minutes for me on a dedicated sever at strato.About 2-3 weeks to upgrade from 1.3.2.4… Cheers. Now the details : )
Thanks, it’s great article.
I tried to upgrade from 1.4.2 to 1.6.1 , and then did “./mage upgrade-all –force” as written in your article. But it’s not working.
I got error message, “upgrade-all: ‘–force’ is not existant channel name / valid uri” How should I do?
Hello Ikuma,
Please enter this command:
./mage upgrade-all –force (two dash symbols instead of one).
Thank you so much for this simple guide, worked like a charm!
Ikuma assuming you’re using PuTTY if you look for some reason copy and pasting ./mage upgrade-all –force results in .. instead of –
manually change them or copy this: ./mage upgrade-all –force
Great HowTo guide
You might encounter problem with “Fatal error: Allowed memory size of xxxx bytes exhausted”
Just edit the file causing the error and put at the beginning of the file:
ini_set(‘memory_limit’, ‘-1′);
Error with the “Wish lists”, look here: http://www.learnmagento.org/magento-bug-fixes/invalid-method-mage_wishlist_block_links/
This article was really in depth.
If in case you want to upgrade Magento from 1.6.0.0 to 1.6.1.0 via diff files then you can try the following article:
http://www.blog.magepsycho.com/upgrading-magento-from-1-6-0-0-to-1-6-1-0-via-diff-file/
At least this worked for me great.
Thanks
Hiya,
I am glad that I found this brilliant article. Unfortunately I am experiencing some issue when preparing the installation (1.5.0.1) to be upgraded. When running ./mage mage-setup I receive the following error message:
Running initial setup…
Success
Success
Error:
channel-add: Channel ‘community’ already exist!
Any idea what to do. The installation/upgrade procedures do not run properly.
Thanks
Hi Miraxx,
This message “channel-add: Channel ‘community’ already exist” means that community channel is already added. Everything is Ok with upgrade scripts.
Make sure that you created full backup and proceed with upgrade.
Hi
This serves to update 1.3.2.3 to 1.4.2.0? or other more advanced version?. I’m trying to update this version for several days, crossing ssh and I do not really coming out, I put all the commands, tells me all ok, but then I see no change and the backend keeps telling me I’m in the version 1.3.2.3.
Help: (
thanks
Hi there
I am trying to upgrade 1.4.1.1 to 1.6.1.0
But
./pear mage-setup gave me following error:
./pear: Permission denied
Also i see that there is no any lib/PEAR folder
Any idea?
FYI, Command: chmod 550 pear
fixed the pear permission error.
Thanks
Hi,
For last 2 days I was searching for good article in updating magento 1.4.1.1 to 1.6 and I found this as “The Best”. I was able to upgrade to 1.4.2.0 but one confusion when I was trying to put “chmod 550 ./mage” it says “chmod: cannot access `./mage’: No such file or directory”…Any idea please
Hi,
I can see a file “pear” under root but no “mage”….Is that ok?….Please suggest
Thanks,
R
hai,
i could do a part of the update, the prepare of 1.4.2. to update to 1.5.
then, with the command ./mage list-upgrades i get the message
list-upgrades: Invalid stability in compareStabilities argument
the follow of part 2 in the troubleshooting is not the solution
Have you a suggestion what to do?
thanks
Thea
Hello Mageraj,
> For last 2 days I was searching for good article in updating magento 1.4.1.1 to 1.6 and I found this as “The Best”.
Thank you for your kind words!
As for mage issue, the mage file should be created after this command:
./pear upgrade -f magento-core/Mage_All_Latest-stable
Please check if permissions of the mage script are correct.
Thank you.
Hello Hai,
If you get this error during upgrade: upgrade-all: Invalid stability in compareStabilities argument
Try to replace this command: ./mage upgrade-all –force
With: ./mage install http://connect20.magentocommerce.com/community Mage_All_Latest –force
I managed to upgrade to 1.4.2.0. Now when I enter the following, I get this output:
[reward@host dev]$ ./mage list-upgrades
Updates for community:
Mage_Downloader: 1.5.0.0 => 1.6.1.0
Inchoo_FeaturedProducts: 1.1.3 => 1.2.3
There’s no option to update Mage_All_Latest.
Thanks.
hi..
How can I convert magento version 1.4.2 to version 1.6 using extension key in magento connect manager. I get the error No valid packages found when updated using magento-core/Mage_All_Latest
Thank You
Everything went smoothly right up until the last part (upgrading to 6.0). Now I’m stuck on the installation wizard page. Anyone know what else I can do without starting all over again?
> How can I convert magento version 1.4.2 to version 1.6 using extension key in magento connect manager.
It is better to upgrade to Magento 1.6 using SSH.
how much cost you to so do this? from 1.3.2.3 to 1.6 upgrade?
to answer Francine’s question… there shouldnt be any costs involved.