I migrated all customer data to my new Magento2 store, but a new Website and Store View was created. I have already built out all of my products, design, etc on an original Website/Store View.

I know I can update accounts individually, but is there a way to move all of these customer accounts to the correct Website and Store View in bulk?

Ideally, I would like to avoid sending any "welcome" notifications when this is done.

Thanks for any help!

1 Answer 1


The fastest way I can think of is modifying customer_entity table.

Let's define two variables, OLD_WEBSITE_ID and NEW_WEBSITE_ID. Then you can run the following sql query. You will change with actual IDs where you see OLD_WEBSITE_ID and NEW_WEBSITE_ID.

UPDATE `customer_eav_attribute_website` SET `website_id` = NEW_WEBSITE_ID WHERE `website_id` = OLD_WEBSITE_ID;

After running this SQL query, you should also run bin/magento indexer:reindex command to re-create indexes.

Please back-up your database. Executing raw MySQL queries is dangerous!

  • Thanks, this worked! Just updated the customer_entity table.
    – pmccain
    Nov 10, 2017 at 15:31

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.