Categories: How ToMagento 2

Magento 1.x to Magento 2.x Migration

The long awaited Magento 2.0 has been released few days ago. There is a vast difference in file structure of Magento 2.x and Magento 1.x, so it’s not possible to upgrade to the 2.0 version like we used to in 1.x version. Though the awesome Magento Community has developed such tools which can help you migrate data of your Magento store from 1.x to 2.x versions. You can’t upgrade the Magento theme to 2.0 but you can at least perform data migration.

Here I will show the how to Migrate data from Magento 1.x to Magento 2.x using a migration tool.

Here are some tools I came to know for Magento 2.x Migration:

  1. data-migration-tool-ce by Magento Team
  2. magento2_data_migration by UberTheme

Here we are going to guide you to migrate to Magento 2 using UberTheme Migration tool:

  1. Download the tool from https://github.com/ubertheme/magento2_data_migration/releases
  2. Extract in the root of your server by making any folder.
  3. We suppose you have already installed Magento 2.
  4. Create these folders, folders shall have write permissions.
WEB_ROOT_PATH\migrate-data-tool\assets

WEB_ROOT_PATH\migrate-data-tool\protected\runtime
  1. Make sure these files also have write permissions.
WEB_ROOT_PATH\migrate-data-tool\protected\config\config.php

WEB_ROOT_PATH\migrate-data-tool\protected\data\ub_tool.db
  1. Run this tool In browser by accessing localhost/foldername
  2. You shall receive following screen. Enter the details of both the databases. Make sure those are accessible if you are using firewall or something.
  3. Once configured, click on next step, it will check the connection between 2 databases and shall show this screen. Select websites and stores you want to migrate.
  4. Clicking on Next step, you will be able to see the screen to migrate attributes.
  5. Migrate Categories now. It will show all the list of categories, you can select few of them or select all to migrate all.
  6. Migrate Products.

You can migrate all types of products you want to migrate, you will have selection as well.

  1. Migrate customers
  2. Migrate Sales Data,
  3. Migrate Reviews and Ratings
  4. Migrate other data.
  5. You will need to reindex to see the migrated data in Magento 2.
Linux : php -f WEB_ROOT_PATH\your_magento2_folder\bin\magento indexer:reindex

Windows: php -f WEB_ROOT_PATH\your_magento2_folder\bin\magento indexer:reindex

Or

php bin/magento cache:flush

php bin/magento indexer:reindex
  1. You will need to resave attribute sets in Magento2 after data migration, go to Stores > Attributes > Attribute Set. Open the Attribute Set, edit information of it if needed and click the save button.
  1. Copy media files
  • Copy the folder at \your_magento1_folder\media\catalog and paste replace to WEB_ROOT_PATH\your_magento2_folder\pub\media\
  • Copy the folder at \your_magento1_folder\media\downloadable and paste replace to WEB_ROOT_PATH\your_magento2_folder\pub\media\

Make recursive write able to “catalog” and “downloadable” folders which you have just copied.

  1. Remove all folders and files in root\magento2_folder\var but take the .htaccess file.
  2. Remove all folders and files in root\magento2_folder\pub\static but take the .htaccess file.
  3. You have successfully migrated all the data from Magento 1.x to Magento 2.0.

 

FAQ:

1. Sales Data is not migrating after complete Migration.

Ans. If you face any trouble in migrating sales data, follow this: https://github.com/ubertheme/magento2_data_migration/issues/12

 

Comment below and we will help you out if you face any issue. I will love to hear from you if you find any other way to migrate the data.

Contact us anytime if you need any help with Magento 2 Custom Development, Extension development and customization, Magento 2 upgrade/migration Service for Magento 1.x versions.

Click to rate this post!
[Total: 12 Average: 4.3]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate ?️ Certified Magento Developer?‍?. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.?

View Comments

  • When import prroduct data face this issue => The requested component ("datetime") is not found. Any Solution ??

  • Hello,

    I cannot get through the first step, when I browse the page I get:

    CDbConnection failed to open the DB connection: could not find driver
    This message is strange to me, 'cause magento is there and installed (php 7) and I can login in the backend, so...

    I did try to setup manually config.php, this way:

    array(
    //Database of Magento1
    'mage1' => array(
    'connectionString' => 'mysql:host=blenny;dbname=gama2',
    'emulatePrepare' => true,
    'username' => 'root',
    'password' => '123qwe',
    'charset' => 'utf8',
    'tablePrefix' => '',
    'class' => 'CDbConnection'
    ),
    //Database of Magento2 beta
    'mage2' => array(
    'connectionString' => 'mysql:host=localhost;dbname=magento',
    'emulatePrepare' => true,
    'username' => 'root',
    'password' => '123qwe',
    'charset' => 'utf8',
    'tablePrefix' => '',
    'class' => 'CDbConnection'
    )
    ),

    'import'=>array(
    //This can change for your magento1 version if needed
    //'application.models.db.{MG1_VERSION}.*',
    'application.models.db.mage19x.*',
    )
    );

    but no luck.
    Any hint?

  • i have many Magento 1.x custom module .how i convert the modules using data Migration?

    • There is no perfect tool available to migrate M1 extension code to M2,
      The only good option is, you can contact extension vendor for M2 Update.

  • When i am trying to save product i get this error “Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist magento2” after migrated 19.2.4 to magento 2.1.
    And when i open any category and product page it saying 404 not found. i have reindexed properly and even i have truncate core_rewrite_url table then i reindexed.
    Any help will be appreciated.

    • Hello @Shailendra. Your errors “Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist magento2” and "product page it saying 404 not found" was fix?

      • Hello Martin
        Please verify following,
        1. In database, look for eav_attribute table
        2. Find image, small_image, swatch_image
        3. Check the frontend_model column values for the above rows
        4. It should be Magento\Catalog\Model\Product\Attribute\Frontend\Image

  • Hello,

    When i am trying to save product i get this error "Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist magento2" after migrated 19.2.4 to magento 2.1.

    And when i open any category and product page it saying 404 not found. i have reindexed properly and even i have truncate core_rewrite_url table then i reindexed.
    Any help will be appreciated.

    • chmod -R 777 pub/ var/
      Run this command from your magento root directories, it should solve your save product issues.

  • Hi Team,

    I have evaluated your Data Migration tool and found two issue.

    The first issue is it doesn't support data migration for custom Product Type under Migrate Product. I have custom product type which was created for Affiliate Products and it didn't get migrated successfully. The other issue I found is migration with Sales data. There is unnecessary validation and if tables are blank the migration is not moving to other steps. Could you please let me know if you can provision custom product type migration as well?

    • Hello
      First thing, this is not our tool, this tool is designed by Ubertheme guys.
      You can ask them for the custom product type, becauseas much as I know, in free version they don't have that feature.
      About sales record, they may have fixed that issue in next version.

  • I have tried to migrate the magento1 into magento2 using UB migration tool. Once the migration completed, I have completed the necessary steps that you've described here. But my problem is URL Rewrite for product. After migration the product URL were perfect but when I saved the category the product url has extra ".html".

    After this, the product pages doesn't load and It gives 404 error.

    • We didn't face such issue yet,
      Are you able to access the products url typed manually in the browser?
      If so, then you will have to figure out, how .html is adding behind the products.

Recent Posts

How to Add Tooltip in Checkout Shipping Field in Magento 2?

Hello Magento Friends, In today’s blog, I will explain How to Add Tooltip in Checkout…

2 days ago

How to Integrate and Use MongoDB with Laravel?

MongoDB is a popular NoSQL database that offers flexibility and scalability when handling modern web…

4 days ago

NodeJS | Callback Function

In NodeJS, callbacks empower developers to execute asynchronous operations like reading files, handling requests, and…

4 days ago

How to Show SKU in Order Summary in Magento 2?

Hello Magento Friends, In today’s blog, we will learn How to Show SKU in Order…

6 days ago

Best Colors to Use for CTA Buttons

The "Buy Now" and "Add to Cart" buttons serve as the primary call-to-action (CTA) elements…

1 week ago

Magento 2: How to Save Custom Field Value to quote_address for Multi-Shipping Orders

Hello Magento Friends, In Magento 2, the checkout process allows customers to choose multiple shipping…

1 week ago