Friday, November 7, 2014

Manual Upgrade using fresh install and original database

By Brent W. Peterson

Agency Coach and Evangelist at WagentoCommerce

This guideline will insure you have a stable version of your site installed with the newest version of Magento software. This upgrade procedure does not rely on Connect or FTP. Peterson recommends using Magerun to perform the upgrade of the database and the subsequent indexing that will be required. You can get more information here Magerun

Peterson also recommends this procedure for upgrading from Magento CE to Magento EE.

Overview

This should be a complete list of items for upgrading the production database, rolling out the new codebase, and transferring DNS resolution to the new Magento instance.

Pre-install

Your pre-install prep-work will save you time and money after you have done you upgrade. The more methodical you are in your preparation, the smother your upgrade will go.

Turn off Indexing for EE

Make sure you server is configured properly!

  1. Set your DNS ttl to 300 or less. Do this now or you make forget later!
  2. Clear and turn your cache off

If you are going to use the browser to upgrade do the following:

Make sure Apache Timeout is set to 18000

Set max_execution time on PHP to 0

Identify and list modules to go to upgraded version

  1. Diff Core of original version to clean core of same version
  2. You may not need all you modules brought over and some modules will not be compatible in a newer version. Each one must be checked and tested.
  3. Make sure to check your Local and Community Folder.
  4. If you have a local/Mage folder you will need to check if the code is compatible with the version you are upgrading to.

Identify theme components to transfer

  1. Diff theme with base or default version of original theme
  2. Make sure all your theme files are in the correct folders and more importantly make sure you theme is compatible with the version you are upgrading to. It is best to test your upgrade on the default theme, then slowing add in just the theme files you need for your theme. There are layout files that are specific to the newer versions of Magento and it is important that these files are used for you install. A good example is checkout.xml.

Identify external components that need to function with new version, review on Magento integration options (i.e. does it make sense to make the external app a Magento app or leave it as an external app)

  1. This also includes API’s that are running and/or loading Mage out side of Magento. Sometimes it make sense to move these external apps to proper Magento extensions.

    Check that all your Magento indexes are up to date

    Dump old database and restore in new database
  2. mysqldump -u user -p ‘password’ -h host olddatabase > yourdump.sql
  3. mysql -u user -p ‘password’ -h host newdatabase < yourdump.sql

    For each upgrade attempt you will need to drop you new database and recreate it, you can not simply restore over an already upgraded database.

Process

Database Upgrade

  1. Export Live database to an SQL dump file (db-YY-MM-DD-pre.sql)
  2. Transfer db-YY-MM-DD-pre.sql to the dedicated database upgrade server and imported into the local MySQL instance
  3. Navigate to your sites main page to instantiate the upgrade process. For more advanced users: I am now recommending you use [[https://github.com/netz98/n98-magerun]] as magerun sys:setup:run
  4. Let process run until finished
  5. Re-index site (magerun index:reindex:all)
  6. Export Upgraded database to an SQL dump file (db-YY-MM-DD-post.sql)
  7. Transfer db-YY-MM-DD-post.sql to the production machine and import into the local MySQL instance

Post Upgrade

  1. Correct Store Issues (Update so admin can login!)
  2. Execute necessary scripts (Many upgrades require database alterations, these should be documented and scripted)
  3. Enter Admin panel and set the following configuration values:
  4. Themes and packages set to default
  5. Refresh cache and indexes

Launch

  1. Switch the Apache vhost references to point to the new instance, disable the old instance
  2. Restart Apache
  3. Site is now live

Other considerations

There are some URL scripts that need to be run when upgrading to 1.13. Please see the documentation here [[http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-upgrading]]

Please feel free to comment and send feed back on this document.

brent@wagento.com

Brent W. Peterson

Peterson’s philosophy on doing upgrades is as William Shakespeare said “Listen to many, speak to a few.”

6 comments:

  1. Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work. magento2 shipping rules

    ReplyDelete
  2. Great post, and great website. Thanks for the information! magento eCommerce analytics

    ReplyDelete
  3. When you choose to work with open source softwares like Magento you will have an enormous amount of liberties in regards to the way you use the software, which is not the case for any other software.
    plakatų dizainas

    ReplyDelete
  4. My friend website has been infected with malware. The tips shared in this post helps me in a better way and guide me to protect my website.
    Hire Magento Developer
    Hire Web Developer
    Hire Wordpress Programmer
    Hire PHP Developer India
    Mobile App Development India

    ReplyDelete
  5. In todays every developer started adopting the rich features of Bootstrap framework. The points you have shared regarding the benefits bootstrap compels most of the business people to make use of this technology.
    Hire Phonegap Developer
    Hire Cake Php Developer
    Hire Dedicated Magento Developer
    Hire Dedicated Web Developers
    Dedicated Wordpress Developer

    ReplyDelete
  6. This post is so informative and makes a piece of very nice information on the topic in my mind.Keep posting as I am gonna come to read it every day.
    magento extensions

    ReplyDelete