cancel
Showing results for 
Search instead for 
Did you mean: 

Data Migration to magento2 - no commands defined in the migrate namespace

SOLVED
Highlighted

Data Migration to magento2 - no commands defined in the migrate namespace

I am hoping someone can help me, been struggling with this for a while and tried whatever I can find. I am on Magento 2.3.4 and attempting to do the data migration from magento 1.9.1.0. The error i am getting is

 

There are no commands defined in the "migrate" namespace.

 

I have run the following commands as suggested in another message on this forum

rm -rf var/log/* generated/* var/cache/*

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento s:s:d -f

php bin/magento cache:flush

 

All worked ok, however error message still appears.

php -v shows me as running php 7.2.31

 

Any pointers would be extremely welcome, please say what information you need that could help

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Data Migration to magento2 - no commands defined in the migrate namespace

Hi @BTaylor351 ,

 

Can you please check whether data migration tool module is installed successfully or not in your magento using below command 

 

php bin/magento

In the list migrate commands should be listed. If not please reinstall this module using below link

 

https://devdocs.magento.com/guides/v2.4/migration/migration-tool-install.html#:~:text=Install%20from....

 

Thanks!

Problem Solved!Click Kudos & Accept as Solution.

View solution in original post

6 REPLIES 6
Highlighted

Re: Data Migration to magento2 - no commands defined in the migrate namespace

Hi @BTaylor351 

 

While migrating data setting, sometimes wrong custom module's setting are imported into M2 core_config_data table, please try to load all Magento commands by :

php bin/magento

If you find any error there, you have to resolve that first then you can proceed.

 

If issue resolve, please click on 'Kudos' & Accept as Solution!

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !
Highlighted

Re: Data Migration to magento2 - no commands defined in the migrate namespace

Hi @BTaylor351 ,

 

Can you please check whether data migration tool module is installed successfully or not in your magento using below command 

 

php bin/magento

In the list migrate commands should be listed. If not please reinstall this module using below link

 

https://devdocs.magento.com/guides/v2.4/migration/migration-tool-install.html#:~:text=Install%20from....

 

Thanks!

Problem Solved!Click Kudos & Accept as Solution.

View solution in original post

Highlighted

Re: Data Migration to magento2 - no commands defined in the migrate namespace

Thanks, the command i am trying to run is

 

php bin/magento migrate:settings /var/www/vhost/DOMAIN/httpdocs/kcmag2/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.1.0/config.xml 

 

Wondering if I missed something when I copied the data migration tool source code into magento. I did this manually as I'm having a problem with composer. I placed it within the vendor/magento directory, perhaps there is something that would get generated by composer if I had done it that way. When I try and use composer i get a unsupported declare and parse error within inventory-composer-installer. 

tmp70.png

Highlighted

Re: Data Migration to magento2 - no commands defined in the migrate namespace

Thanks, ran that and no there is no migrate command showing. I need to reinstall the data migration tool. Having an issue with composer, need to try and sort that out first.

 

Thanks again.

Highlighted

Re: Data Migration to magento2 - no commands defined in the migrate namespace

Hi @BTaylor351 ,

 

Can you please mention what issue you are facing while installing module in magento.

 

Thanks !

Highlighted

Re: Data Migration to magento2 - no commands defined in the migrate namespace

Thank you both for your help. The solution turned out to be which version of PHP is used by the cmd line. I was thinking I was using php 7.2 but seemingly it was using the server base php 5.4 still despite everything it was telling me.

 

Upgraded the base php to 7.2 using https://linuxconfig.org/how-to-install-or-upgrade-to-php-7-on-centos-linux-server instructions. Composer problem is cleared and once I use composer to reload the data migration tool, I'm hopeful that will be sorted too