I am learning how to convert Magento 1.x to Magento 2.x

I installed fresh Magento ver. from GitHub mirror and fresh Magento 2.2.3 using composer

maddy@maddy:/var/www/html/magento-composer$ sudo php bin/magento --version
[sudo] password for maddy: 
Magento CLI version 2.2.3


In magento 1.9.3 i created one product, one category and placed one order now i am trying to migrate it to fresh Magento 2.

i followed this link Install Data Migration Tool to install the toool.

composer config repositories.magento composer https://repo.magento.com composer require magento/data-migration-tool:2.2.3

but when i run above commands i got

  You must pass the type and a url. Example: php composer.phar config reposit  
  ories.foo vcs https://bar.com                                                

config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]...


I am not able to solve this, can anyone see what is the issue.

Update: if i run below command i got some error realated to memory

maddy@maddy:/var/www/html/magento-composer$ composer require magento/data-migration-tool:2.2.3

Installation failed, reverting ./composer.json to its original content.
The following exception is caused by a lack of memory and not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details

  proc_open(): fork failed - Cannot allocate memory 

maddy@maddy:/var/www/html/magento-composer$ free -m
              total        used        free      shared  buff/cache   available
Mem:           3868        2758         105         303        1005         476
Swap:           475         470           5

Thank You

2 Answers 2


composer config repositories.magento composer https://repo.magento.com


composer require magento/data-migration-tool:2.2.3

EDIT: Second question:

proc_open(): fork failed - Cannot allocate memory

Adjust PHP memory_limit

Check also in var/www/html/magento-composer/.user.ini - You will see there some php config values.

Validate the change with php -i | grep memory_limit in console.

  • I already increased PHP memory limit in ini file but no success
    – inrsaurabh
    Commented Mar 18, 2018 at 12:28
  • @inrsaurabh Check updated answer
    – dudzio
    Commented Mar 19, 2018 at 10:23

Please execute this command from your Magento root directory to migrate Magento1 to Magento2,

  • composer update
  • composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool
  • composer require magento/data-migration-tool:2.2.3
  • php bin/magento migrate:settings vendor/magento/data-migration-tool/etc/opensource-to-opensource/
  • php bin/magento migrate:data --reset vendor/magento/data-migration-tool/etc/opensource-to-opensource/
  • Flush all Magento 2 cache types
  • Reindex all Magento 2 indexers

Replace with your Magento1 version.

I hope this will help you.

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.