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.


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?


2 Answers 2


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


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!

  • This is the most coherent and un-contradictory guide I've seen on how to do this. I wish some vendors would actually take time to explain things like you have. Jul 5, 2017 at 10:25

You can just download the zip file by clicking the download button, after that, unzip it, open it, find the composser, right click and choose prefer source installation

  • Sorry for my lack grammer. Can this solve your problem? Feb 19, 2016 at 9:53
  • I think that you could have offered more information to help out the OP, such as what to do following the the selection of source installation...maybe some steps, a link to docs, etc.
    – ryanF
    Jun 10, 2016 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.