I have more then 10k products in base store and want now assign all to new website as multistore in system with/by sql how i assign all products to the new websites/storeviews using sql?

use Magento 2.3.3

I have the WebSite ID´s: 4, 5, 6 where i want assign all products in bulk by sql query in one step

  • refer this link :- magento.stackexchange.com/questions/140097/… 2> backup the this table and import the new websites – Mohit Patel Apr 2 at 20:12
  • thanks for fast feedback if i use this string: INSERT INTO catalog_product_website (product_id, website_id) VALUES ('2049', '1'); i must define every product by id but i want it for all in the query – Stefan Strasser Apr 2 at 20:48
  • Stefan, then create a script to select all products and create the required SQL based off the example? – Barry Apr 3 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.