The document discusses upgrading Magento through Magento Connect. It describes why upgrades are important, things to consider before upgrading like backing up files and databases, potential issues, testing the upgrade, and both pros and cons of upgrading. Methods covered include using Magento Connect or the command line.
3. 1/2/12
Agenda
Introduction
Why to upgrade magento.
Care should be taken before upgradation
Common Issues faced during upgradation
Different methods for upgradation
Testing the Magento Upgrade
Demo using magento connect
Pros
Cons Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
4. 1/2/12
Introduction
Magento is a vast e-commerce platform.
Magento developers keep upgrading with new
versions of magento.
Everybody wants that they should be upgraded
with the latest version of Magento.
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
6. Care should be taken
Before Upgradation
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
1/2/12
Back up of root directory.
Back up of complete database.
File comparison.
If any modification found in core file then
overwrite the file in locale code pool and replace
the file with core file.
7. Common Issues faced
During Upgradation
Current stable version does not show up on
magento connect.
1/2/12
File permission.
Add the following snippet of code in
downloader/lib/Mage/Connect/Validator.php
to fix magento connect issue.
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
8. Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
1/2/12
public function compareStabilities($s1, $s2) {
$list = $this->getStabilities();
$tmp = array_combine(array_values($list),array_keys($list));
// Code snippet to be inserted starts here //====================
if ($s1 == "dev") { $s11="dev"; $s1="devel"; }
if ($s2 == "dev") { $s22="dev"; $s2="devel"; }
// Code snippet to be inserted ends here //====================
if (!isset($tmp[$s1], $tmp[$s2])) {
throw new Exception("Invalid stability in compareStabilities argument");
}
9. Different methods for
1/2/12
Upgradation
Using Command Prompt:
STEP 1: Enable maintenance mode
cd /magento_folder
#for example: cd /var/www/magento
touch maintenance.flag
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
10. STEP 2: Backup your database and folders
mysqldump [magento_database_name] –u [magento_user] –
p[magento_database_password] >
> magento_database_name_backup_date.sql
# for example: mysqldump magento_db –u dbuser –pdbpassword >
magento_db_ backup_01012013.sql
tar –cvf magento_backup_date.tar /magento_folder
# for example: tar –cvf /var/www/magento_backup.tar
/var/www/magento
cp -R /your_magento_folder /your_magento_backup_folder
# for example: cp /your_magento_folder/ magento_backup.tar
/your_magento_backup_folder
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
1/2/12
12. 1/2/12
The last command should list the expected
Magento modules as follows:
Installed package for channel 'community' :
Lib_Js_Ext 1.7.0.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
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
13. If modules were not listed, you’ll need to upgrade
using:
./mage install
http://connect20.magentocommerce.com/community
Mage_All_Latest –force
If your Magento modules were listed - use the
following commands:
./mage list-upgrades
./mage upgrade-all
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
1/2/12
14. When the process is complete you’ll see a list of
modules saying ‘already installed’, ’package
upgraded’ etc...), make sure your permissions
are set back to normal:
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
1/2/12
php shell/indexer.php reindexall
chmod -R 644 ./*
find . -type d -exec chmod 755 {} ;
chmod 550 ./mage
STEP 4: Go live
cd /magento_folder
rm -f maintenance.flag
15. Testing the Magento
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014
1/2/12
Upgrade
Browse through the complete site.
Check each and every functionality.
Do a complete QA after upgrade.
Revert back the file permission
17. 1/2/12
Cons
If the upgrade is not done with caution then the
site may break.
If the core files are tempered and you don't have
your back up or overwritten in local, then your
data will be lost.
Number of unwanted bug
Presenter: Sammanita Pattnayak,
Mindfire Solutions
Date: 31/03/2014