By Engine23

Magento Linux Upgrade from 1.6.0, 1.6.1 or 1.6.2 to

Magento Linux Upgrade from 1.6.0, 1.6.1 or 1.6.2 to

If you are not afraid of Magento Magic, just use the yoursite.com/downloader/

It seems to be the best way.

Upgrade via SSH version 1.6 to 1.7

1. Put your site into maintenance mode. This can often be as simple as editing your “/etc/apache2/sites-enabled/default” file to point to a custom “park” page that you have created to let your customers (and Google) know that your site is only temporarily down. However, if you are doing this right, you will do this upgrade on a VALIDATION SERVER (i.e. a test environment) and get all of the quirks worked out before rolling it out into production. Here is a PRO TIP from an SEO Guru (cr8s.net): Setting the HTTP headers on your temporary “park” page that lets your visitors know that you’re down for a bit to provide status code 502 (service temporarily unavailable) will buy you a little more time in case a search engine crawler comes and sees that your site is down. You should be able to get away with downtimes of up to 24 hours (or 30 to 60 minutes on very high traffic sites) without seeing a penalty to your search engine rankings. Of course, none of this will be an issue if you are using a VALIDATION ENVIRONMENT / TEST SERVER to do this upgrade, which you should DEFINITELY be doing.

2. Create a full site backup of the files and database. Make sure it finishes completely! Here are the commands for backing up a site manually:

  1. cd /home/myaccount/magento
  2. tar -zcvf ../20120430-magento-backup.tar.gz * .htaccess
  3. cd ..
  4. mysqldump -h DBHOST -u DBUSER -p --single-transaction DBNAME > 20120430-magento-data.sql && tar -zcvf 20120430-magento-data.tar.gz 20120430-magento-data.sql
  5. rm -rf ./20120430-magento-data.sql

NOTE: This code is for Linux. If you’re using something else, please consult a different guide.

If you are experiencing trouble with those commands, look closely... you probably didn’t switch some of the content (like “/home/myaccount/magento” with “/var/www/” or wherever your installation resides, or the database username, password, etc.) with your personalized info.

Note that you don’t have to use 20120430 in your backup file names... that just happens to be TODAY’S date. We recommend you use whatever the date is currently when you do your backup, so you can differentiate it from other backups.

3. Upgrade the site using the command prompt shell. NOTE: This code is for Linux. If you’re using something else, please consult a different guide.

  1. sudo su
  2. chmod -R 777 ./*
  3. rm -rf var/cache/* var/session/*
  4. chmod 550 ./mage
  5. ./mage mage-setup .
  6. ./mage config-set preferred_state stable
  7. ./mage list-installed
  8. ./mage list-upgrades
  9. ./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
  10. php shell/indexer.php reindexall
  11. chmod -R 644 ./*
  12. find . -type d -exec chmod 755 {} \;
  13. chmod 550 ./mage

4. Move your site back into “production” mode by reversing whatever you did for step one.

5. Cross your fingers, and test your site.


As of April 2012, Magento 1.7 is still fairly new. You can try contacting the developers in the Magento Community Forums or on their individual websites to get them to upgrade to the newest platform. If you have custom extensions or plugins that no longer work, you’ll either need to get administrative support from their developers or patch them yourself.

Admin navigation dropdowns broken

A resolution for this issue is currently being investigated.

Adding products to cart breaks the site

When this issue occurs, you may find that you can no longer view some or all of your site after adding products to your cart. This is due to issues with the image cache following an upgrade. Please make sure to empty your “var/cache” folder (within the site root) and this should resolve your problem.

Something is broken that is not mentioned here

Okay, rule #1: “Don’t panic”. Hopefully you are doing this upgrade in a “validation environment” (i.e. a test server) and have copious backups. However, in any case you can try to run the database fixer tool (available in the downloads section of Magento Commerce) to try and reconcile any issues with your site. If worst comes to worse, try posting your specific problem in the forums (or search for similar issues; chances are, someone else has already experienced your problem).

We’ve just reviewed the first and most recommended means of upgrading your Magento site. The other two methods of upgrading your site are as follows: Option #2) Copy the new site files on top of the old ones and run install.php Option #3) Create a fresh installation and migrate the data into the new install, subsequently using the Database Repair tool to fix inconsistencies

... if you’re still having trouble with the migration using the method listed here, try option #2. If all else fails, Option #3 is usually a safe bet.

When everything– and we mean EVERYTHING– goes “not too swell” (in a hand basket), you can always (assuming you have lots of tidy backups and you’re doing all of this in a validation environment (a “test server”) do a completely fresh installation, EXPORT your images, product catalog and customer database, and IMPORT them into the new site. However, we can’t stress enough how much you do NOT want to go through that. It’s a real pain in the butt and can take a very long time.