Magento Migration Tips

You optimize your Magento store to make it more convenient for customers and for yourself, you pay for customizations, buy extensions, improve design and usability. But Magento doesn't stand still and releases newer versions from time to time. And you may naturally want your store to be based on the newest Magento version, as it usually provides for higher performance and speed, more advanced security and other advantages.

Magento offers good tools for upgrading to later versions. However, sometimes there may be obstacles to your successful Magento update. Luckily, they can be overcome.

With the fresh Magento Community Edition 1.8 release, we thought some guidelines on upgrading your Magento might come in handy.

Code

1. Modified templates may be changed to introduce different patterns of data output.

At best, you won't be able to see some customization, but at worst it will lead to Magento errors and failures. The visual sameness of two versions doesn't imply inner sameness (templates codes, javascript). Our guess is that Magento developers make a newer version look like a previous one.

2. Libraries. Magento includes JS and PHP (Zend) libraries. These libraries evolve independently from Magento and the developers include versions which are the most stable at the time of development. As the result, because some features are absent or have been changed, the customizations or extensions based on previous versions of libraries don't work anymore. In some cases the whole library is replaced with a new one.

3. The code of Magento itself. Downward compatibility is often a limit to further development. That is why in some cases, some features are rejected or incoming /outcoming data are changed. As the result, third party code (extensions, customizations) starts to cause errors.

Data Structure (Database)

 1. Magento data structure modification via a third-party code (customizations and extensions). Not all developers try to leave Magento data structure intact. As the result data structure or database update queries cause failures and the update is interrupted before it is complete.

2. Changes of the data. In Magento, the data that constitute the current version is supposed to be holistic and to be on the list of valid values. In a number of cases, the data integrity can be compromised by a third-party code (customizations and extensions). In the process of data conversion, failures may happen, which will cause the Magento update process to interrupt.

3. Incomplete transactions. In a number of cases (for various reasons including technical ones) the code (of both extensions and Magento itself) doesn't stop running. As the result, the database update is only partial and the problems described in the previous paragraph come up. Sometimes such things happen when Magento update wasn't completed for some reason.

Optimal Upgrade Strategy

1. Back up as often as possible, as the consequences of the data loss for an ecommerce store are huge. Besides, it is good to keep file change logs (it will allow to quickly track changes that influenced the Magento performance).

2. Make a list of extensions you want to migrate to the new version of Magento. Make sure you have the source codes of these modules that are compatible with the new version of Magento. (Having the file lists of extensions will allow you to check the integrity of packages uploaded to your Magento.

3. Adapt your current design to the new Magento version. In some cases, you can find Guidelines regarding the differences between the old and new templates. But this option is good only for relatively simple cases.

4. The update must be carried out on a separate host in order not to harm neither the database code nor its structure.

5. Make a test update and check its performance: make several transactions with different payment systems that you use. (Before each update you have to back up data, it will allow you to have up-to-date information on backups).

6. Before you do anything, make sure the following are disabled:

- APC server cache;

- Magento cache, third party caching modules;

- Compiler.

Otherwise, the changes may not be displayed or displayed with a delay, which will complicate the update process.

7. Using repository systems will allow to avoid problems with downloading files, and to roll back changes blocking the work of Magento, if needed.

But what if the suggested scenario still leads to a faulty upgrade? In our opinion, there are two options for the solution:

First: Try to “force cross” the process i.e. find the areas in which your update gets stuck and repair the failures either yourself or with the help of a third party specialist. In a number of cases such approach works. Anyway, you will have to do it at least twice. First time as a test and then as your real website update. It is hard to pre-evaluate the labor costs of the process. It might take an hour but it might as well take several days. After the upgrade is complete you have to carefully test the result to make sure it is really finished.

This option has a significant drawback: the time of complete Magento update is actually downtime, and shopping at your store during that time is impossible. Sales will be lost.

Second: Install a new copy of Magento and migrate all the data from the old one.

It is done by the following algorithm:

1. Make a list of all entities you have in your current Magento that you would like to see in your new Magento. For example:

  • Products and their descriptions (including custom options, SEO information);
  • Categories structure;
  • Users;
  • CMS pages;
  • Templates;
  • Settings;
  • Orders;
  • Invoices;
  • Shipments;
  • Third party code data (third-party code can accumulate information while running, for example, additional order-related data).

Check the compatibility of current extension with the new version of Magento, otherwise, you can get a dead extension which means a lack of needed features.

2. Evaluate labor costs of the migration of each type of information, possible migration scenarios and the order of migration. It is better to install the extensions you want to see on the new version of your website right on the new, freshly installed Magento.

Here is a scenario example:

  • You will probably have to migrate the categories structure manually, though you may use a module that helps to migrate categories. It is very important that category IDs are identical. You will need that at the next stage of the process.
  • Products migration is one of the basic features of Magento. But again it is very important that categories IDs are identical. Otherwise, your products will be associated with other categories and you will have to change everything manually, which is a very laborious process.
  • Users migration is also one of the basic features of Magento. It might be right to migrate the user groups in advance so that you don't waste your time on that afterwards.
  • Most CMS pages can be migrated manually.
  • E-mail templates can also be migrated manually in most cases.
  • Settings. Here you will also have to open two windows side by side and transfer all parameters one by one.
  • Orders, invoices, shipments. There are solutions for that (for example Order Import-export developed by AITOC) that allow to migrate all orders, invoices, shipments automatically associating them with products and users in the system.
  • Third party solutions data (extensions and customizations). In a number of cases, this data is stored in a separate table and the author of a solution can help you migrate the data to the new Magento (maybe for a fee). In some solutions, e.g. Checkout Fields Manager, extended order data can be easily migrated with the help of Order Import & Export extension. But in some cases, migration labor costs are so high that it is more reasonable to just have a copy of old Magento in order to refer to the data it contains when needed.

VERY IMPORTANT: When updating and migrating large amounts of data, PHP can store p execution of the script. That is why you should ask your hosing company to temporarily increase or remove both memory limits and the time limit to the execution of PHP scripts. In some cases, it is reasonable to raise limits to the size of the files being uploaded.

We recommend you to find out the exact working hours of your support service, so that you can quickly settle migration-related problems that arise in the course of the process. Also, it is good to evaluate time and labor costs you will have to bear in order to accomplish all the stages of the procedure.

This is what may typically constitute your expenditures:

1. Extensions compatible with the new Magento version. In a number of cases, the term of free updates of a needed extension may be over, and new updates are paid.

2. Personal time expenditures. You have to be ready for 4 to 8 hours of your personal time to be spent on a number of tasks that involve manual data migration and extensions setup and coordination.

3. The cost of migration assistant software. Migrating Magento to a new version may require additional resources, so you have to be prepared for additional expenditures and ensure the migration is economically sound.

 

So, migriting to a newer Magento version can come with multiple challenges. However, it is definitely worth it. Should you need any help with Magento migration services, our team is always ready to help.

 

Are there any useful tips on Magento migration we could have left out? Are you planning to upgrade your Magento to the upcoming CE 1.8? How often do you upgrade your Magento? Please share your insights in the comments below.