The following article is part 1 of a multipart series on performing Complex Magento Upgrades. Part Two, “Rock the Diff”
Upgrade from CE 1.4 to 1.9. The installation has many theme and module customizations applied to it.
Here’s how to tackle a project like this.
Preparation, Preparation, Preparation
Like painting a house, preparation is key. Install 4 – yes 4 – sites prior to beginning the upgrade. In my case:
- Pristine 1.4 (base installation of Magento 1.4, no customizations)
- Pristine 1.9 (base installation of Magento 1.9, no customizations)
- Old (untouched copy of existing, old site)
- Development (your new site, with a clean Magento 1.9 install)
Old, community editing (CE) versions can be found here: Magento Downloads click “Release Archive”.
Each installation should be done locally (which means running OSX or Linux) on a fast machine. Being local means you can quickly compare files using visual comparison tools. No need to push changes to a server. Speed really matters when you are comparing 36,000 files.
Give each site a clearly, identifiable domain name, such as “pristine1.4.acme.com”, “pristine1.9.acme.com”, “old.acme.com”, “upgrade.acme.com”.
Why do this?
Your biggest enemy is your own confusion as you dig into the thousands of files in a Magento installation.
During the migration process, you will constantly be asking yourself, “what is the baseline?” For example, because passwords were hashed after version 1.7, they can no longer be sent via email. If you had customized your email template, you’ll want a copy of the pristine 1.9 email template, which now contains a password reset link instead of plain text password.
The “baseline” will also inevitably include “how did it work before”? (And, yes, this question will come up after you’ve taken the old site down.)
The 4 sites let you compare files using a three-way-diff. Now you can see what changes other developers had made.
I can’t stress how important it is to always have a (quick) answer on-hand for your baseline questions.
Warning: when you switch administration between multiple sites, clear your cookies. If you go back to the administrative login screen after attempting to login, you probably need to clear cookies.
I also recommend the following:
- Document all modules in your installation, including version numbers. You can find the modules in /app/etc/modules and version numbers in their corresponding /etc folder within /app/code/local or community/ [company] /[modulename] /etc/config.xml
- Add all files to a git repo. Git is fast and allows you to “play” or “experiment” freely (e.g. make lots of changes) without feeling like you’re going to accidentally leave something in a broken state. Use Atlassian SourceTree or Tower to visually compare and roll-back changes you’ve made.