Close

December 21, 2012

Magento Enterprise Upgrade Tips

As most Magento developers or administrators know, the upgrade process from version to version can be a bit dicey and time consuming. We have run into all sorts of roadblocks and snafus and thought it would be nice to share our tips.

1.) Development box: Must Must Must Must have one of these! It should be roughly the same hardware as your current production box. Make a duplicate copy of your production, upgrade and come up with your own procedure list.

2.) Fall back plan : Always expect the Inquisition. Even with a procedure list and test process success, make sure you have a fall back. Do a snapshot of the database/html files somewhere else. Practice restoring on the development box and ensure this process works.

3.) Database size: Check your database size. If you do not have your log cleaning setup on a cron schedule, chances are your database is going to grow exponential. Check out this guide to help get your database in order. Once you have it cleaned/tested on the development box, fix the production server as well. A smaller database will help the upgrade process A LOT!

4.) Downtime: Make sure your plan your downtime well and leave room for “uh ohs”. You can get a ballpark with the upgrade on your development box, but make sure to pad the estimate. Make sure you have a “kill time” planned. For instance: If upgrade process is still going after 3:00AM, we are pulling the plug and reverting back to our old version.

5.) Monitor: Make sure you monitor the upgrade. The biggest changes are always MySQL based. One trick we use to monitor the database and ensure it is not “stuck” in a loop is to use the following command:
watch -n 15 mysqladmin -u dbname -pMyPassword -uMyUser processlist

Every 15 seconds it just calls the database and ask “Whatcha doin?”. If there are any processes that are taking a LONG time (depends on your database hardware), there could be something wrong.

6.) Maintenance Mode: Learn about maintenance mode. You absolutely need to have this on to prevent any users from triggering your upgrade prematurely.

7.) Be Brave : If your upgrade is getting close to your kill time, be ready to pull the plugin. Shutdown your MYSQL service and apache2 service. Make sure your maintenance mode is on and turn back on the services. Restore from backups. Analyze what went wrong and try and prevent it moving forward.

Documentation is absolutely critical in this process. It will help you solve the immediate issue and give you something to remember for the next upgrade.

We hope this helps!

Useful Upgrade Guides

Mike By Waters – Upgrade
Greg Demetrick – Updating a Magento Enterprise Install