I am upgrading magento from 1.7 to 1.8. This is the first time I am doing this. Can u tell me how to proceed on this. I had taken db backup using system->tools->backup.

Should I take system backup from there or using the FTP?

Should I use Magento upgrade or ssh(don't know details how to use this, just found some suggestion on Google)


6 Answers 6


Take a Code backup as well as DB backup before upgrade. Use SSH to upgrade. Follow below steps to upgrade..

  1. Open a command terminal.
  2. Go to your Magento directory by cd command like cd /var/www/yourmagento/ & run below commands step by step...
  3. chmod -R 755 lib/PEAR
  4. chmod 550 pear
  5. ./pear mage-setup
  6. ./pear channel-update connect.magentocommerce.com/core
  7. perl -pi -e 's/\r\n/\n/g' pear # if you uploaded from a windows computer?
  8. ./pear upgrade -f magento-core/Mage_All_Latest-stable
  9. chmod 550 ./mage
  10. ./mage mage-setup . (* notice the dot after mage-setup command)
  11. ./mage sync
  12. ./mage list-upgrades
  13. ./mage upgrade-all --force
  14. Open config.xml and change the statement SET NAMES utf8; SET FOREIGN_KEY_CHECKS=0; SET UNIQUE_CHECKS=0;
  15. Empty your cache,sessions
  16. Visit your site. It will take some time to loading depends on your data. Normally for 2 GB it will take 2 hours.
  • 3
    Use php index.php from the command line instead of visiting your site to avoid webserver timeouts. Probably worth running it in screen too.
    – xyphoid
    Commented Dec 1, 2013 at 11:33
  • 1
    This did not work for me. It failed in last step. Maybe because of this note from the officale upgrade guide Important: To avoid errors after upgrading to EE 1.13.1, you must set up a parallel system. Do not upgrade your existing system or post-upgrade errors are likely to occur. Commented Dec 9, 2013 at 17:02
  • What error occurred? Could you please put some details..
    – Pravin
    Commented Dec 10, 2013 at 15:01
  • Why do you SET FOREIGN_KEY_CHECKS=0 ??? Commented Nov 2, 2015 at 12:24

The Magento Connect Manager (System > Magento Connect > Magento Connect Manager) provides a nice way to upgrade - click the "check for upgrades" option, then select the latest version of Mage_All_Latest. After that you can pick and choose which non-core modules to update as well.

Surely lots of people are aware of this option, so why is it that nobody seems to suggest it? In all my Googling / StackExchanging / StackOverflowing I've not seen it suggested once. Does anybody know of a good reason this method is / should be avoided?

  • 1
    you are right. At least partially. I know that option, but I had only problems with it. I prefer a manual upgrade. Also it's not a good idea to upgrade a live website this way. You don't have control over what happens.
    – Marius
    Commented Feb 14, 2014 at 9:49
  • Because magento connect is a tool which doesn't play well with different environments and versioning. Commented Feb 14, 2014 at 10:32
  • You can easily run into permission issues, e.g. if a core file was edited manually and not writeable by the webserver it can break the update process and damage the whole installation.
    – thebod
    Commented Feb 14, 2014 at 10:57
  • worked for me but the end result ( for 1.8 vn) was missing the scriptaculuos folder ( from js) ... I added it manually from the downloaded version and was fine. Commented Apr 18, 2014 at 14:59

There is an official documentation how to upgrade to Magento ce-1.8. But I have not tried it yet.


For magento upgrades you will definitely save yourself a lot of stress by using ssh. So after your system->tools->backup be sure to manually backup your local.xml (usually located at magento-install-directory/app/etc/local.xml ) . The local.xml file which holds your settings and the info you will need to reinstall magento.

I cosign on the maurisource.com link in johnpearson's answer & the official directions, both are useful. personally I ran into an issue running mage getting this error:

magento-install-directory/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 125

but this link below helped. probably cause I was on a bluehost shared host box. had to add this line to mage: MAGE_PHP_BIN="php-cli" http://www.magentocommerce.com/boards/v/viewthread/301933/#t459768

if you need to reinstall at any point during your upgrade. make a copy of local.xml, then delete it. browsing to your site will take you through the steps. open the local.xml copy to help guide you through install, be sure to use the KEY from local.xml


Disable/Uninstall all your extensions/plugins and note it down, you might have to install all plugins again after migration(also check your extension is supported in Magento 1.9, if not you need to find some alternate plugins) Verify your application is running fine on your local environment.(note down any issue you found and make sure it is logical issues) Download magento 1.9 from magento website.(http://www.magentocommerce.com/download)


cd /your_magento_folder
chmod -R 777 ./*
rm -rf var/cache/* var/session/*
chmod 550 ./mage
./mage mage-setup .
./mage config-set preferred_state stable
./mage list-installed 

The complete installation guide I found is here: http://maurisource.com/en/magento-upgrade-1-8-stable/

  • 1
    chmod 777 isn't great. Keep permissions limited to what you require.
    – xyphoid
    Commented Dec 1, 2013 at 11:35
  • @xyphoid I agree - although Magento puts local.xml inside the DOCUMENT_ROOT O.o.
    – Ash
    Commented Feb 14, 2014 at 17:30