I have a production server with Magento ver. 1.9.1.0. I understand that there is an important security upgrade I should do...What is the best (understand easiest) way to do this? Is the upgrade safe?
2 Answers
The most important part of this is to try out the upgrades/patches on a replica of your production server to ensure that nothing is broken.
Applying Patches
If you want to just apply the patches, after verifying that there no issues on the development environment, you can proceed to applying the patch(es) on your production server. Flush the cache, and warm it back up (if you are using a FPC that needs to be warmed), and you should be good to go. Just upload the patch to the home directory (where the app
, lib
, media
folders exist), ssh into the server, cd
to the folder and type sh [PATCH_FILE_NAME].sh
.
Upgrading Magento
If you want to upgrade the Magento codebase, without using patches, the roadmap is more complex. Here is a good explanation on how to do this. The way that I like to upgrade is to create a separate folder for Magento (at the same level as the current folder which contains Magento). Install the new version version into this folder. Copy media
, app/etc/local.xml
and any other modules from your old Magento folder. When you are ready to deploy, rename the old magento folder, and rename the new Magento folder like this:
/var/www/sites/magento // currently running Magento
/var/www/sites/mage-upgrade // load new version into here
Then:
mv /var/www/sites/magento /var/www/sites/magento-old
mv /var/www/sites/mage-upgrade /var/www/sites/magento
And, don't forget to set the appropriate permissions.
Final Thoughts
I have begun to use git to manage the version of Magento currently installed (when I have verified everything in a separate environment).
- Magento download page: https://www.magentocommerce.com/download
- Release notes for 1.9.2.1: http://merch.docs.magento.com/ce/user_guide/Magento_Community_Edition_User_Guide.html#magento/release-notes-ce-1.9.2.1.html
- Magento 1.x Github Mirror: https://github.com/OpenMage/magento-mirror
-
Thank you Joseph - you are the best! I have installed the same version of the Magento shopping cart on another domain so I can test it there. How is the upgrade done though? Through Magento Connect or manually? Thanks again! :-*– AllysinCommented Aug 18, 2015 at 16:02
-
Recently I did upgrade of our production server from 1.8.0.0 to 1.9.2.0 (then 1.9.2.1) and also we changed our server environment from single to cluster (separate web, cache/session and DB servers behind a load balancer)
There are official roadmap and guide for the upgrade here: http://devdocs.magento.com/guides/m1x/install/installing_upgrade_ce18_upgrade-roadmap.html http://devdocs.magento.com/guides/m1x/install/installing_upgrade_details.html
I followed them as well as bunch of other guides, howtos and tutorials. Just Google "Magento Upgrade Steps".
What I learned:
It is not going to be flawless upgrade. Be ready to face troubles (even if test environment went smoothly). alway keep latest backups handy.
Pay attention to small differences in the code that is not seem to be much important. We use custom developed template, but we faced issue with formkey in forms that was new in magento 1.9.x but was not in magento 1.8.x (base theme).
Check versions of all your extensions (some of them are just working well before you touch them) and you can realize that you need to upgrade them to the latest and some of the developers are charging for extra upgrade period (It cost $$$).
In my situation I could afford little downtime (I did it weekend night time) and later checked that actual one was about 20 min (cumulative), but I'm not sure what is your situation.
Anyway I felt myself as walking on minefield ))
In your situation you can just hit "commit changes" in Magento Connect Manager.
Good luck!