How to Upgrade Your Magento Store – 10 Tips and Tricks

As an online merchant, there comes a point where you either have upgraded or are considering to upgrade your Magento store. Doing such an upgrade can be very tricky and complicated. As a result, we wrote this post to help you prepare for your next Magento version upgrade and also share with you what we […]

By Joel Holtzman

How to Upgrade Your Magento Store - 10 Tips and Tricks

As an online merchant, there comes a point where you either have upgraded or are considering to upgrade your Magento store. Doing such an upgrade can be very tricky and complicated. As a result, we wrote this post to help you prepare for your next Magento version upgrade and also share with you what we have learned from upgrading numerous Magento websites. First, I’ll briefly outline the upgrade process below, then I’ll provide you with some useful upgrade tips and tricks. Keep in mind, that while each situation is unique some of these tips and tricks will apply to your upgrade process!

Magento Upgrade Process

  1. Make sure you have backups of the code before putting the store in Maintenance Mode.
  2. Reindex before and after upgrading.
  3. Make sure you have database backups as well.
  4. Make sure compilation mode is disabled.
  5. Delete the cache using rm -rf /var/cache/*
  6. Delete sessions using rm -rf /var/sessions/*
  7. Upload the tar file then extract it using tar -zxvf magento.tar.gz
  8. Next copy it a directory higher to upgrade the files using cp -r magento/*
  9. Visit the frontend and remove or resolve any bugs present.
  10. You now have the latest version of Magento installed.

At this point, all of Magento will get upgraded the next time that you visit the frontend part of your store (NOTE: You’ll have to make an exception for your IP address to not be affected by maintenance mode). The upgrade scripts will run and hopefully everything will work as expected. However, oftentimes it does not go as smoothly as this process makes it seem.

Magento Upgrade Tips and Tricks

Here’s a few common issues I’ve run into:

Google Checkout remaining on older versions of Magento. Specifically, one of my co-workers Joel, has already written a detailed blog post about how to deal with this. You can read it here.

The second most common issue I’ve run into involves issues with categories and or products not showing up correctly. The best way to resolve this is to take notice of any modules that are involved with SEO or rewriting URLs. If you find any, I would make sure that they too are upgraded to the latest version. This will typically resolve any issues. The times that this has happened in the past, this issue was always resolved by either upgrading the module or disabling it.

On one upgrade from 1.8 to 1.9.1 I faced an interesting scenario where the front page would not load after upgrading. It’d show half the background and that’s it. After some debugging, I also noticed that the Payment Method’s tab in the Admin panel was not loading. I realized that Magento’s core /Paypal/ module had been overwritten by the previous developers in app/code/local/. I disabled this by changing the name of the folder to “Paypal_Old”. Sure enough, the site then began to load and Paypal worked again!

Another common problem with upgrading that can be easily resolved is customers can’t login to their account or update their cart. The reason for this is that newer versions of Magento now utilize a formkey that must be added to each and every form. Just add in the formkey, and everything will work again!

If your site doesn’t load or pages are broken the easiest way to go through with resolving it is to disable installed modules one by one. Every-time you disable a module, through app/etc/modules, you refresh the broken page. Eventually, through process of elimination you may find out why the store isn’t loading. Some module developers have Adminhtml modules – I usually don’t bother with disabling these and it can even make the problem worse depending on the module developer.

If you need help with your Magento store, call 845-656-3000 or Contact us here »

During the upgrade process of one of our client sites, I had upgraded the development server flawlessly to the latest version of Magento. When the decision was made to push it live, we repeated the same exact steps on the production server. This time however, there was a nice “SQL” Error saying that two tables couldn’t be joined because of missing columns in a table. We actually ended up fixing this by enabling cache, and manually creating those columns and then re-indexing. Although this isn’t always a practical solution, it ended up working in this situation.

An alternative approach to upgrading, which may make debugging easier is disabling modules and extensions all prior to upgrading and reseting the theme to default. Then, after you upgrade, you change the theme back, and also enable extensions one by one checking each time which ones need to be fixed or cause problems.
Upgrading Magento with a relatively short period of downtime can be achieved through the use of GIT and version control. By simply doing an upgrade on the development branch, and pushing those changes live, as well as having worked out all of the bugs, you will have avoided the need to do any serious work besides letting the database upgrade scripts hit on the live site.

An easy way to check for any modifications to the core Magento files is to run ‘diff’ comparison between a clean version of Magento and the current product version of Magento. Although the best practices of Magento development state that one must never modify the core files, certain developers, do not follow the rules.

Don’t forget to check mobile. For one client in particular, they were using a mobile theme extension and the mobile theme that was being used became extremely outdated due to the upgrades. The changes on the old version had to be re-done and customized on an updated version of the mobile extension.

We highly recommend that you upgrade Magento to the latest stable Magento version. The longer you wait,  the more complex will be to upgrade and maintain the previous look and functionality.

Magento Development Lead