We recommend reading the documentation related to Updating Magento first. You can find it here:
http://devdocs.magento.com/guides/m1x/install/installing_upgrade_details.html
I don't believe it was noted in that article, but it's also advisable to be methodical when doing upgrades by only upgrading by one major step at a time.
ex. Upgrading from 1.4.0 to 1.9.1 will most likely will lead to a lot of errors and debugging.
instead: Upgrade from 1.4.0 to 1.4.2, then to 1.5.1, then 1.6.1, etc.... until you reach current version.
Upgrading directly to another version that is multiples past the current version (ex. 1.5 to 1.7) will most likely always lead to issues and debugging problems. It's advisable to instead take the upgrade path 1.5 > 1.6 > 1.7. Many clients do not understand how involved a Magento upgrade could be, and can incur many additional costs when falling behind by multiple versions and not staying up-to-date. Upgrading from 1.6 to 1.9 is not nearly as simple and cost effective as upgrading from 1.8 to 1.9.
It's worth bearing in mind that if this is on a live site, there will be orders coming in while doing the migration. You'd want to put it on maintenance mode while you do the migration, and as this would potentially take a while, there's a failry simple way I've seen people use before:
First duplicate the live site on another server. Then go through the upgrades one by one, making detailed notes of files and lines which needed editing.
When you have the dupicated site running well, you can then put the original store on maintenance mode, then repeat the process on the live store. This should be fast as you've made detailed notes of what needed doing.