we are refering below steps for upgrading Magento to any version, first of all you will upgrade your stage environment.
Then need to follow same steps on production environment if all features working propely.
Step 1
1. Enable maintenance mode on your instance
cd /stageIstance
for example: cd /var/www/magento
touch maintenance.flag
STEP 2: Manually you can take backup of your database and directories.
Make sure you take the full backup of your store’s database and directories.
STEP 3: Commence the upgrade process
cd /magento_folder
cd /magento_folder
rm -rf var/cache/* var/session/*
chmod -R 777 /magento_folder
chmod 550 ./mage
./mage mage-setup .
./mage config-set preferred_state stable
./mage list-installed
When you use ‘./mage list-installed’ command in the command prompt, the Magento modules are listed in the same manner as shown below.
Installed package for channel 'community' :
Lib_Js_Ext 1.8.1.0 stable
Lib_LinLibertineFont 2.8.14.1 stable
Lib_Js_TinyMCE 3.4.7.0 stable
Lib_Js_Calendar 1.51.1.1 stable
Lib_Phpseclib 1.5.0.0 stable
Lib_ZF 1.11.1.0 stable
Lib_Js_Prototype 1.8.0.0.4 stable
Lib_ZF_Locale 1.11.1.0 stable
Mage_All_Latest 1.8.1.0 stable
Interface_Adminhtml_Default 1.8.1.0 stable
Interface_Frontend_Default 1.8.1.0 stable
Interface_Install_Default 1.8.1.0 stable
Mage_Downloader 1.8.1.0 stable
Mage_Centinel 1.8.1.0 stable
Interface_Frontend_Base_Default 1.8.1.0 stable
Phoenix_Moneybookers 1.3.2 stable
Mage_Compiler 1.8.1.0 stable
Magento_Mobile 1.8.1.0.23.1 stable
Mage_Core_Adminhtml 1.8.1.0 stable
Mage_Core_Modules 1.8.1.0 stable
Lib_Varien 1.8.1.0 stable
Lib_Google_Checkout 1.8.1.0 stable
Lib_Js_Mage 1.8.1.0 stable
Mage_Locale_en_US 1.8.1.0 stable
Lib_Mage 1.8.1.0 stable
In case, modules are not listed, use the below given command to upgrade further:
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
And if your Magento modules are listed – use the following commands:
./mage list-upgrades
./mage upgrade-all
Once the upgrade process is done, you’ll see a list of modules – ‘already installed’, ’package upgraded’, make sure your permissions are set back to normal:
php shell/indexer.php reindexall
chmod -R 644 ./*
find . -type d -exec chmod 755 {} \;
chmod 550 ./mage
STEP 4: Verification
Before migrating to 1.9.0.1 version, check the compatibility of all third party extensions on your website.
STEP 5: Go live with your website
Execute the following command to remove security flag.
cd /magento_folder
rm -f maintenance.flag