Magento – Magento 2- code-migration installation using git

gitmagento-1.9magento2magento2-migration-tool

I have got the link for the tool to migrate code of Magento 1.x to Magento 2.x.

But have no idea how to execute it.

https://github.com/magento/code-migration

I have tried following command in cmd to install this module –

composer config repositories.code-migration git https://github.com/magento/code-migration

composer require magento/migration:dev-master

I am getting below exception –

Problem 1
– The requested package magento/code-migration-develop could not be found in any version, there may be a typo in the package name.

Potential causes:
1. A typo in the package name
2. The package is not available in a stable-enough version according to your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Installation failed, reverting ./composer.json to its original content.

Any idea how to resolve this?

Best Answer

Follow the steps:

1) Download it as a zip into any folder of your machine. Unzip it into your local directory. Not in the directory where you have your magento installed.

2) Login to your server via shell.

3) Switch to the directory whcih you just unzipped i.e code-migration-develop by using

cd "/path-to-/code-migration-develop"

4) Run command following command in root directory of this folder

composer install

5) Let the composer do its job. Then switch to bin directory under code-migration-develop.

Command: cd bin

6)Now execute:

php migrate.php migrateModuleStructure /path-to-your-magento1.x-installation /path-to-your-magento2.0-installation

It will convert the structure and you will see these converted structure in

code-migration-develop/app/code

7) Next step:

php migrate.php convertLayout /path-to-your-magento2.0-installation-directory

8) Run

php migrate.php convertPhpCode /path-to-your-magento1.x-installation /path-to-your-magento2.0-installation

That's it. Note that during this last step, you might have lots of warnings. That is, because, the code migration cannot do everything on it's own. Some manual work still needs to be done. These warnings are logged in a log file /code-migration-develop/var/migration.log.

Hope it helps in your case!

Related Topic