# Magento upgrade from 1.7 to 1.8

URL: https://sohaib.com/blog/magento-upgrade-from-1-7-to-1-8
Author: Sohaib Khan
Published: Oct 31, 2013
Updated: Sep 8, 2026
Category: E-commerce Solutions

> Take a Code backup as well as DB backup before upgrade. Use SSH to upgrade. Follow below steps to upgrade.. Open command terminal. Go to your Magento directory by cd command like cd /var/www/yourmagento/ & run below…

Take a Code backup as well as DB backup before upgrade. Use SSH to upgrade. Follow below steps to upgrade.. Open command terminal. Go to your Magento directory by cd command like cd /var/www/yourmagento/ & run below commands step by step...

```bash
chmod -R 777 lib/PEAR
chmod 550 pear
./pear mage-setup
perl -pi -e 's/rn/n/g' pear
./pear upgrade -f magento-core/Mage_All_Latest-stable
chmod 550 ./mage
./mage mage-setup . (* notice the dot after mage-setup command)
./mage sync
./mage list-upgrades
./mage upgrade-all –force
```

Open config.xml and change the statement SET NAMES utf8; SET FOREIGN\_KEY\_CHECKS=0; SET UNIQUE\_CHECKS=0; Empty your cache,sessions Visit your site. It will take some time to loading depends on your data. Normally for 2 GB it will take 2 hours.
