I need to upgrade my Magento store from 1.7 to 1.9. I am very new to Magento, SSH and MySQL. I was just wondering what is the easiest way to upgrade without breaking my website.
6 Answers
Upgrade Roadmap for CE 1.9.0.1 from 1.7
- Take a backup of current database and current 1.7 code. place maintenance.flag file inside 1.7 code folder to put website offline.
- Download latest magento from the http://www.magentocommerce.com/download
- Remove all folders and files from your 1.7 code except
maintenance.flag(but you should have backup somewhere) and place all folders and files from the 1.9. - Now from your 1.7 merge your following custom folders into the 1.9
- Community
app/code/community - Local
app/code/local - Media
- your theme or package (
app/design/frontend/default/<your theme>orapp/design/frontend/<your package>) - custom folders from Skin (both for adminhtml and frontend).
- copy your custom xml files from
app/etc/modules/to currentapp/etc/modules/ - any custom admin theme folder from
adminhtml/default/yourtheme. - copy your custom folders from
adminhtml/default/default/(1.7) to adminhtml/default/default/ (1.9). - custom js files if any from
app/js/.
- Community
- Now go to
app/etc/local.xml.Edit database details their.put your database username and password and database name. - Remove
maintenance.flagfile and check the site in the browser. it is done.
- 9,236
- 2
- 41
- 73
-
2Do not forget the encryption key of the old version. When upgrading the site to new installation, be sure to use the same Encryption Key – Mohamed23gharbi Apr 06 '15 at 14:57
-
This method works quite well for me. Some extensions may need to be reinstalled though. – yldziner Apr 27 '15 at 18:21
-
12I would say it's not a complete guide on how to do it. It will work in some specific cases, but if your custom theme changed the login page for example - your customers will no longer be able to log in.
See: http://stackoverflow.com/questions/20565688/magento-customer-cant-log-in
Also, mentioning maintenance.flag suggests that it's OK to do this on live. Never do Magento upgrade on a live environment. Always test on a dev / staging first to catch cases like the one mentioned by me, because there is so much more that can go wrong.
– Wiktor Jarka May 21 '15 at 07:51 -
1Also don't forget to add the formkeys to the new template otherwise you won't be able to use any of the forms. See http://stackoverflow.com/a/20702053/564338 for more information. – Daniel West Aug 14 '15 at 10:45
-
https://wiki.magento.com/display/m1wiki/Manual+upgrade+using+a+fresh+install+and+new+database – Fiasco Labs Nov 30 '15 at 15:44
-
Thanks, this worked perfectly for me. I only got one error with the Googlecheckout helper, which can be solved using this method: http://magento.stackexchange.com/questions/60757/error-after-upgrade-failed-opening-mage-googlecheckout-helper-data-php-for-in/60769 – Niels Jun 02 '16 at 13:55
-
( Remove all folders and files from your 1.7 code ) CAN YOU PLEASE mentioned the directory path or folders or files which needs to remove. – Muhammad Azeem Aug 01 '16 at 16:40
-
It should be stated that this is a fully manual upgrade. The default way to upgrade Magento according to the docs is from commandline or Mage downloader. – Akif Aug 30 '16 at 13:51
-
If you have a localised version of Magento, don't forget to copy the localisations in directory app/locale – Bjinse Mar 10 '21 at 13:45
First of all, create the database same as current magento 1.7. Then download magento 1.9.0.1 from http://www.magentocommerce.com/download
Now run the installation of magento 1.9 and choose the database of your old website (magento 1.7.0.2)
Now you can take the your theme and skin from old version to new. Then after check one by one third party extension from old to new. I did it and it will work for for me.
- 856
- 6
- 5
Magento 1.x upgrade instruction using SSH or Command line:
1) Go to your Magento root directory
cd /path/to/your/magento/folder
2) Enable Maintenance mode for your Magento site
For this, you have to create an empty file named maintenance.flag in your Magento root directory.
touch maintenance.flag
3) Clear Cache & Sessions
rm -rf var/cache/* var/session/*
4) Check Compilation & Disable it if Enabled
Check Compiler Status
php -f shell/compiler.php -- state
If the Compiler Status is Disabled then you can skip this step and move on to the next step.
If the Compiler Status is Enabled then you have to disable it with the following command:
php -f shell/compiler.php -- disable
5) Give write permission to all Magento files and folders
chmod -R 777 .
6) Give 550 permission mage file
Mage file is a shell script file. With 550 permission, we are just making the file non-writable + readable & executable by user and group only.
chmod 550 ./mage
7) Change config settings to stable
./mage config-set preferred_state stable
8) Upgrade Magento
You can list all the installed packages with the following command:
./mage list-installed
You can list all the upgradable packages with the following command:
./mage list-upgrades
The following command will upgrade all the packages:
./mage upgrade-all --force
It will take some time to complete the upgrade.
9) Reindex Data
After completing the upgrade, we should reindex all data.
php shell/indexer.php reindexall
10) Then, clear cache and session again.
rm -rf var/cache/* var/session/*
11) Enable Compilation only if it was Enabled before upgrade
Check step 4) above.
If Compilation was not enabled in step 4) then you can skip this step and go to next step.
If Compilation was enabled for your website and you had disabled it at step 4) then you have to Enable it with the following command:
php -f shell/compiler.php -- enable
12) Change files permission
Before the upgrade, we have changed the permission of all files and folders to 777. You should also give proper permission to all files and folders of your Magento site.
Convert files permission to 644 and folders permission to 755
find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;
Give read-write full permission, i.e. 777 to var and media folders.
chmod -R 777 var media
Give 550 permission to mage shell script file
chmod 550 ./mage
13) Check installed packages version
Check the versions of the installed packages. The packages should show the latest version as they are already upgraded now.
./mage list-installed
14) List upgradable packages
List the upgradable packages (packages that need an upgrade). This should result in a message saying No upgrades available because all packages have been already upgraded to the latest version.
./mage list-upgrades
15) Disable Maintenance mode to make the site Live
rm -f maintenance.flag
This will delete the file maintenance.flag and then the site will be live again.
You can now login to Magento admin and see the Magento version displayed in the footer section. It should show the latest version number.
Source: Magento 1.x – Update / Upgrade to Latest Version via both Browser & Command Line
- 5,383
- 4
- 37
- 51
Current Version Magento CE 1.7.0.2
Admin panel -> System -> Magento Connect -> Magento Connect Manager
Check for Upgrades
Mage_All_Latest -> select Upgrade to 1.9.0.1
Make sure that Third-party extensions and local customizations need to be taken into account, make a proper backup.
- 4,788
- 1
- 13
- 30
-
18
-
1Also when upgrading with Connect you will not know which modifications it did . – Mohamed23gharbi Apr 06 '15 at 14:54
-
1@Simon (or someone else) could you clarify your statment, maybee with sources? I did a test upgrade from 1.7 to 1.9 everything works fine. – Akif Sep 07 '16 at 12:29
-
@Akif simply google for it. See e.g. https://www.integer-net.com/why-modules-shouldnt-be-installed-via-magento-connect-manager/ or http://magento.stackexchange.com/q/40359/142. – Simon Sep 07 '16 at 13:31
-
1@Simon thanks, I don't see why one should not use it based on the arguments of the first link considering that one knows what he or she is doing. For non professionals I think most arguments are valid. I hope this clarifies your statement with +12 for future refference. It should be more like; "Don't use it unless you know what you are doing". – Akif Sep 07 '16 at 13:38
-
@Akif no, if you want to use it, you do not really know what you are doing. Sorry, but I think this is a very important and serious point. – Simon Sep 07 '16 at 14:07
-
@Simon too bad this is commenting because otherwise I could have given a breakdown of the topic to refute each argument. I think its misleading to make a bold statement without argumenting why. – Akif Sep 07 '16 at 14:13
-
I've seen Magento connect literally wipe a whole installation (including some connect manager files) because it deletes the files before performing a version check which failed. This is why you always take a backup and avoid Magento Connect Manager at all costs kids! – micwallace Mar 15 '17 at 04:14
Why anyone not suggesting the real easiest way - as the question demands.
Just go to System >> Configuration >> Connect Manager
and use key http://connect20.magentocommerce.com/community/mage_all_latest
and if you need to a specific version, you may download it and upload it as a package in the same magento connect
- 493
- 6
- 16
-
+1 This is literally how I update all three of our separate Magento installs. If it weren't for me reviewing and testing everything thoroughly, it would literally take maybe 20 seconds for each update. We started on 1.7 and have easily (other than the form_keys for 1.8) updated incrementally to 1.9.4.0. Just have to clear out the pkginfo/ and var/package directories before beginning the update process via Magento Connect. – MagentoAaron Jan 08 '19 at 19:10
Follow these steps to upgrade your Magento 1.7 store to Magento 1.9:
Magento Compilation from System > Tools > Compilation > Disable
Magento Cache from System > Cache Management > Select All > Action: Disable > Submit
Remove all files and folders from your Magento v1.7 directory (make sure to keep your backup in a safe place) and place all files and folders from Magento v1.9.x package.
Open your favorite web browser, go to your link. You will be asked to install fresh Magento v1.9.x store but don’t worry, keep going and when you will reach to the Configuration page. Fill it up with the same information you used for your previous Magento v1.7 store which includes SQL DB Server Hostname, SQL DB Name, SQL Server Username, SQL Server Password, Base URL and Admin Path.
Once you finish the installation, do not visit frontend or backend page. From your Magento v1.7 files and folders backup, copy and merge following files and folders into your new Magento v1.9.x store directory:
Community Folder: ROOT > app > code > community
Local Folder: ROOT > app > code > local
Media Folder in Root Directory: ROOT > media
Your Theme Folder: ROOT > app > design > frontend > default (package name) > “your_theme” (If you are using “default” package for your theme then just copy theme folder otherwise you need to copy the whole package which includes your theme folder)
Skin Folder in Root Directory: ROOT > skin
Module’s Custom XML Files: ROOT > app > etc > modules > “your_custom_XML_files”
Admin Theme Folder: ROOT > app > design > adminhtml > default
Custom JS Folder: ROOT > app > js
Now finally delete everything from ROOT > var > cache and from ROOT > var > sessions to clear all sessions and cache.
- 3,816
- 5
- 32
- 69
- 923
- 12
- 23


For same you need to run the your original website on old database and new magento 1.9 on newly created database. So both websites works simultaneous
– kapil Zaru May 30 '14 at 11:50