How to transfer your Customers from Magento 1.x to Magento 2

How to transfer Customer From Magento to Magento 2

The database is a well-organized collection of information that can be easily accessed, managed and updated, and this data is stored in rows, columns, and tables, and with its own index that makes it easier to fetch relevant information whenever needed. One powerful eCommerce CMS Magento relies on MYSQL Database which is completely open source and one of the most popular languages for adding, accessing and managing content in a database in an easy and flexible way. And your customer’s information plays a vital role in your business because without having your customer’s information your business is almost incapable of doing marketing and suggest products to your customers.
Sometimes it happens that the store admin wants fresh Magento 2 update without importing all the data back or admin came across a requirement of just transferring Magento 1 store customers to Magento 2 store which is a cumbersome task if you are the newbie. So, we are back with another powerful script that will help you to transfer all your customer information to your Magento 2 stores including store credentials, address and other information.
To do the same first we need to create ‘customer.php’ in Magento 1.x root folder to generate a main customer CSV file that we will later import to Magento 2 store.


After that, we need to create one more ‘customeraddress.php’ script in the same location of Magento 1.x root folder for creating all customer address CSV file.


After running both the script in your Magento 1.x root folder now you can find “customer.csv” file that is generated using the first script and “customerAddress.csv” file that is generated after successful execution of the second script.
Now it’s time to import these CSV files into your Magento 2 backend and for that purpose navigate to System->Import

For importing “customer.csv” file select “Customers Main File” option from the dropdown and for importing “customerAddress.csv” select Customer Addresses option from the dropdown and select remaining option according to your business need.

That’s it! If you found this blog helpful, don’t forget to share it with your colleagues and Magento Friends.
And, Let us know if you are facing an issue while implementing this code.
Happy Transfer!

Previous Article

How to get a Special Price of the Product in Magento 2

Next Article

Complete Step by step guide on setting up Shoppable Instagram Posts

Write a Comment
  1. Hi,
    Thanks for this solution. Think it’s exactly what I need but the second script gives me an error. First script customer.php runs great and gives me an nice csv file but when I run the second script customeraddress.php I get this error. I’ve copy paste it several times and run it.

    php -f /home/itennis/domains/itennis.nl/public_html/customeraddress.php
    PHP Fatal error: Uncaught Error: Call to a member function getID() on boolean in /home/xxxxx/domains/xxxxxxx.xx/public_html/customeraddress.php:29
    Stack trace:
    #0 {main}
    thrown in /home/xxxxx/domains/xxxxxxx.xx/public_html/customeraddress.php on line 29

    Could you please help me?

      1. The same problem happened to me. How do you easily identify the customers whose default billing or shipping are not set?

        1. Kindly check for which customer this script gives you an error, actually that customer might have some issues like some entry deleted from the database or something like that

  2. After running both the script in Magento 1.x root folder I not receive customer.csv and customerAddress.csv

  3. Exactly what I was looking for – thanks.
    However, I have an issue with the GroupID information – this is set to ‘1’ for all customers. Anything I made wrong or it that not covered?

    1. The code for the Group Id is there, but currently, we pass static there, but you can make it dynamic when you export the data according to your requirements.

Leave a Comment

Your email address will not be published. Required fields are marked *

Get Connect With Us

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨