Upgrade Roadmap for Magento Community Edition (CE) 1.8 or 1.9

Magento recommends you upgrade your installation using the following guidelines in a development or test environment, separate from your existing production environment:

Install Magento in a different directory:

Recommended. Set up a new system (that is, another host) on which to install Magento.
The system should be identical to, if not better than, your current system. The new system must meet the Magento system requirements.

Install Magento in a new, empty root installation directory on the same server.

In your current production environment:

Back up your Magento database.

Archive the file system.
This includes the media directory and subdirectories; all extensions and customizations; and all custom themes.

In the development or test environment:

Create a new, empty database instance.

Import the production database tables into the development database instance.

Copy your production media directory, extensions, themes, and other customizations to the development system.

Copy local.xml to [your Magento install dir]/app/etc and edit it if necessary to reference the production database instance.

In a web browser, go to your development system base URL.

Wait for upgrade scripts to run.

Verify the development system is now identical to the production system.
If not, fix issues, retest, and upgrade again.