Today, we’re going to teach you guys how to use Code Migration Develop tool for code migration from Magento 1 to Magento 2.
This tool was specially built for Magento users.
By using this tool, you can easily migrate your code from Magento 1 to Magento 2 platform.
And in this tutorial, we’re going to show you the step-by-step process to migrate code from Magento 1 to Magento 2 using Magento 2 Data Migration Tool.
How to use Magento 2 Code Migration tool for Magento 2 Migration?
To successfully migrate your code from Magento 1 to Magento 2 platform, please follow the below steps.
Step 1. Download the Code Migration Tool
First of all, download the code-migration-develop tool as a .zip file into any folder of your system from github.com.
Step 2. Extract the Tool
After that, Unzip the downloaded file in your local directory. Remember, do not unzip the file where you’ve installed your Magento.
Step 3. Log in to the Server
Now, login to your server through Shell.
Step 4. Navigate to the Tool Directory
Next, switch to the folder where you unzipped the file by executing the following command:
cd "/path-to-/code-migration-develop"
Step 5. Install Dependencies
After that, execute the below command in the root directory of the same folder.
composer install
Step 6. Switch to the Bin Directory
Now, allow the composer to finish its job.
Once it is done, switch to the bin directory under the code-migration-develop folder by executing the below command:
cd bin
Step 7. Convert Module Structure
Next, execute the following command to convert the code structure.
php migrate.php migrateModuleStructure /path-to-your-magento1.x-installation /path-to-your-magento2.0-installation
You can see the converted code structure in the code-migration-develop/app/code directory.
Step 8. Convert Layout Files
Now, the next step is to execute the below command:
php migrate.php convertLayout /path-to-your-magento2.0-installation-directory
Step 9. Migrate PHP Code
Lastly, run the following command to finish the process:
php migrate.php convertPhpCode /path-to-your-magento1.x-installation /path-to-your-magento2.0-installation
And that’s about it!
NOTE: During the last step, you might see some warnings. These warnings will occur because the code-migration-develop tool is not capable to do everything on its own.
There will be some manual work that you’ll need to do.
You can easily identify these warnings in the log file /code-migration-develop/var/migration.log from where you can perform the remaining manual code migrate job.
Conclusion
That’s it! This is how you can migrate code from Magento 1 to Magento 2 platform using the Code-Migration-Develop tool.
We hope that you found this tutorial helpful. If you have any queries or doubts, please ask them in the comments below.
And if you need our professional assistance with code migration from Magento 1 to Magneto 2, feel free to contact us at any time.