Migration Guide from Magento 1 to OpenMage

Fastest way to migrate

We are pleased that you are considering moving from Magento 1.x - to one of the best solutions in the market - OpenManage LTS. We are excited to share the details about the migration process.

Composer

Github methodology - This guide provides information on the workflow and best practices for using it to migrate your data. Let's take a look at this method.

Migration Magento 1.9.4.5 to OpenMage 1.9.4.x

1. Switch from your current production branch (here master) to new one (here migration)

git checkout -b migration

2. Print remotes

git remote -v

The output looks like:

origin https://lorem.ipsum/lorem-ipsum/lorem.ipsum/magento.git (fetch)
origin https://lorem.ipsum/lorem-ipsum/lorem.ipsum/magento.git (push)

3. Add upstream repository

git remote add upstream https://github.com/OpenMage/magento-lts.git

The output looks like:

origin https://lorem.ipsum/lorem-ipsum/lorem.ipsum/magento.git (fetch)
origin https://lorem.ipsum/lorem-ipsum/lorem.ipsum/magento.git (push)
upstream         https://github.com/OpenMage/magento-lts.git (fetch)
upstream         https://github.com/OpenMage/magento-lts.git (push)

4. Fetch changes from upstream

git fetch upstream

The output looks like:

warning: no common commits
remote: Enumerating objects: 59, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 257784 (delta 6), reused 43 (delta 1), pack-reused 257725
Receiving objects: 100% (257784/257784), 95.79 MiB | 1.78 MiB/s, done.
Resolving deltas: 100% (164945/164945), done.
From https://github.com/OpenMage/magento-lts
 * [new branch]        1.8.0                 -> upstream/1.8.0
 * [new branch]        1.8.1                 -> upstream/1.8.1
 * [new branch]        1.9.0                 -> upstream/1.9.0
 * [new branch]        1.9.1                 -> upstream/1.9.1
 * [new branch]        1.9.2                 -> upstream/1.9.2
 * [new branch]        1.9.2.0               -> upstream/1.9.2.0
 * [new branch]        1.9.2.1               -> upstream/1.9.2.1
 * [new branch]        1.9.2.2               -> upstream/1.9.2.2
 * [new branch]        1.9.2.3               -> upstream/1.9.2.3
 * [new branch]        1.9.2.4               -> upstream/1.9.2.4
 * [new branch]        1.9.3.0               -> upstream/1.9.3.0
 * [new branch]        1.9.3.1               -> upstream/1.9.3.1
 * [new branch]        1.9.3.x               -> upstream/1.9.3.x
 * [new branch]        1.9.4.x               -> upstream/1.9.4.x
 * [new branch]        20.0                  -> upstream/20.0
 * [new branch]        docker-dev-setup      -> upstream/docker-dev-setup
 * [new branch]        functional-test-suite -> upstream/functional-test-suite
 * [new tag]               1.1.1                 -> 1.1.1
 * [new tag]               1.1.2                 -> 1.1.2
 * [new tag]               1.1.3                 -> 1.1.3
 * [new tag]               1.1.4                 -> 1.1.4
 * [new tag]               1.1.5                 -> 1.1.5
 * [new tag]               1.1.6                 -> 1.1.6
 * [new tag]               1.1.7                 -> 1.1.7
 * [new tag]               1.1.8                 -> 1.1.8
 * [new tag]               1.2.0                 -> 1.2.0
 * [new tag]               1.2.0.1               -> 1.2.0.1
 * [new tag]               1.2.0.2               -> 1.2.0.2
 * [new tag]               1.2.0.3               -> 1.2.0.3
 * [new tag]               1.2.1                 -> 1.2.1
 * [new tag]               1.2.1.1               -> 1.2.1.1
 * [new tag]               1.2.1.2               -> 1.2.1.2
 * [new tag]               1.3.0                 -> 1.3.0
 * [new tag]               1.3.1                 -> 1.3.1
 * [new tag]               1.3.1.1               -> 1.3.1.1
 * [new tag]               1.3.2                 -> 1.3.2
 * [new tag]               1.3.2.1               -> 1.3.2.1
 * [new tag]               1.3.2.2               -> 1.3.2.2
 * [new tag]               1.3.2.3               -> 1.3.2.3
 * [new tag]               1.3.2.4               -> 1.3.2.4
 * [new tag]               1.4.0.0               -> 1.4.0.0
 * [new tag]               1.4.0.0-alpha1        -> 1.4.0.0-alpha1
 * [new tag]               1.4.0.0-alpha2        -> 1.4.0.0-alpha2
 * [new tag]               1.4.0.0-alpha3        -> 1.4.0.0-alpha3
 * [new tag]               1.4.0.0-beta1         -> 1.4.0.0-beta1
 * [new tag]               1.4.0.0-rc1           -> 1.4.0.0-rc1
 * [new tag]               1.4.0.1               -> 1.4.0.1
 * [new tag]               1.4.1.0               -> 1.4.1.0
 * [new tag]               1.4.1.1               -> 1.4.1.1
 * [new tag]               1.4.2.0               -> 1.4.2.0
 * [new tag]               1.5.0.0               -> 1.5.0.0
 * [new tag]               1.5.0.0-alpha1        -> 1.5.0.0-alpha1
 * [new tag]               1.5.0.0-alpha2        -> 1.5.0.0-alpha2
 * [new tag]               1.5.0.0-beta1         -> 1.5.0.0-beta1
 * [new tag]               1.5.0.0-beta2         -> 1.5.0.0-beta2
 * [new tag]               1.5.0.0-rc1           -> 1.5.0.0-rc1
 * [new tag]               1.5.0.0-rc2           -> 1.5.0.0-rc2
 * [new tag]               1.5.0.1               -> 1.5.0.1
 * [new tag]               1.5.1.0               -> 1.5.1.0
 * [new tag]               1.6.0.0               -> 1.6.0.0
 * [new tag]               1.6.0.0-alpha1        -> 1.6.0.0-alpha1
 * [new tag]               1.6.0.0-beta1         -> 1.6.0.0-beta1
 * [new tag]               1.6.0.0-rc1           -> 1.6.0.0-rc1
 * [new tag]               1.6.0.0-rc2           -> 1.6.0.0-rc2
 * [new tag]               1.6.1.0               -> 1.6.1.0
 * [new tag]               1.6.1.0-alpha1        -> 1.6.1.0-alpha1
 * [new tag]               1.6.1.0-beta1         -> 1.6.1.0-beta1
 * [new tag]               1.6.1.0-rc1           -> 1.6.1.0-rc1
 * [new tag]               1.7.0.0               -> 1.7.0.0
 * [new tag]               1.7.0.0-alpha1        -> 1.7.0.0-alpha1
 * [new tag]               1.7.0.0-beta1         -> 1.7.0.0-beta1
 * [new tag]               1.7.0.0-rc1           -> 1.7.0.0-rc1
 * [new tag]               1.7.0.1               -> 1.7.0.1
 * [new tag]               1.7.0.2               -> 1.7.0.2
 * [new tag]               1.8.0.0               -> 1.8.0.0
 * [new tag]               1.8.0.0-alpha1        -> 1.8.0.0-alpha1
 * [new tag]               1.8.1.0               -> 1.8.1.0
 * [new tag]               1.9.0.0               -> 1.9.0.0
 * [new tag]               1.9.0.1               -> 1.9.0.1
 * [new tag]               1.9.1.0-lts           -> 1.9.1.0-lts
 * [new tag]               1.9.1.1               -> 1.9.1.1
 * [new tag]               v19.4.0               -> v19.4.0
 * [new tag]               v19.4.1               -> v19.4.1
 * [new tag]               v19.4.2               -> v19.4.2
 * [new tag]               v19.4.3               -> v19.4.3

5. Rebase with OpenMage branch (here: main)

We go in more detail about other versions here.

git rebase -X theirs upstream/main

6. How to proceed when problem appears.

In this case, there was an issue with the auto-merge cron.sh and mage file. You have to decide about those files modes and then add and commit them.

git add cron.sh mage
git commit

7. Everything is set and ready to push

8. Clear cache (probably the best way is to remove var/cache folder in Magento root)

second method
Requirements
  • a working installation of Magento 1.9.4.5
  • write access to Magento code on the server
  • git repo init in Magento root directory

BEFORE ANY ACTIONS A BACKUP OF CODE AND DATABASE IS HIGHLY RECOMMENDED

Advantages of this method

It has a few advantages when we compare it to other methods like simply copy/paste OpenMage code into the Magento root directory:

  • access to all commits of OpenMage project in git log
  • possibility to use git tools to manually compare some of the crucial files and decide what changes should be merged into our project (like Mage.php. Index.php, .htacces etc.)
  • using OpenMage as a fork for your project. This will allow you to easily update code in the future
second method