• Resolved Hossein Khadem Abolfazl

    (@hoseinkh)


    Hi woocommerce team,

    I tried to manually transfer the data from the source site to the destination site. Everything went well. But after I transferred the products to the source site using the WooCommerce Export system, changing the product ID caused problems with the order and everything related to the products. Is there a way to ensure that the product ID does not change when importing the data and is the same as the source site?

    I understand that changing the IDs is a logical behavior. Because there may be similar IDs before the import. But what is the solution?

    Thanks in advance for any advice.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Stef

    (@serafinnyc)

    @hoseinkh

    Hey, you’re sorta contradicting yourself here, and I want to make sure I fully understand what happened.

    You mentioned changing the product ID, then asked if the importer could stop it from changing. Just to clarify, WooCommerce’s importer will always generate new IDs. It doesn’t preserve originals from the source site to avoid conflicts.

    If keeping product IDs intact is important for order relationships, you’d need to do a full database migration or use a tool that supports ID mapping. Manually changing IDs or assuming they’ll stay the same during import is likely what caused the issue.

    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Hi @serafinnyc,

    Sorry for the inconsistency. I use Google Translate and it happens.

    Yes, exactly. Changing the product ID on the origin site caused problems.

    In general, what is the best way to fully migrate data so that there are no data synchronization issues at the destination site? By data, I mean:

    Products, Orders, Users, Reviews, Product terms

    Best regards

    Stef

    (@serafinnyc)

    Hey @hoseinkh

    Ah, that explains it. Just want to have clarity here when advising, so thanks for all that.

    If you’re migrating everything like Products, Orders, Users, Reviews, and Terms, and you want to keep all relationships intact, the best option is a full database migration. That way, all post IDs and user IDs stay the same and nothing breaks.

    If you’re moving between live environments and a full database copy isn’t possible, tools like WP Migrate DB Pro or BlogVault can help. Otherwise, WP All Import and Export Pro can work, but you need to be really careful with mapping and ID references since everything will get new IDs on import.

    Always take a SQL backup if you’re new to this type of work.

    Plugin Support Sai (woo-hc)

    (@saivutukuru)

    Hi @hoseinkh,

    Thanks for reaching out and thank you @serafinnyc for the detailed advice!

    Just to confirm, Stef is absolutely right: if you need to preserve product IDs (and relationships between orders, reviews, etc.), a full database migration is the safest option. WooCommerce’s built-in import/export tools will create new post IDs, which can affect links between data.

    If you’re looking for a plugin-based approach, tools like WP All Import Pro (with order and user add-ons), or services like BlogVault or WP Migrate DB Pro, are commonly used for complex migrations.

    Let us know if you need any help choosing a tool or running the migration, happy to help further!

    kosteve

    (@kosteve)

    It’s great that I found this thread – i’m having the same problem.

    Stef

    (@serafinnyc)

    @kosteve glad you found it and that it’s helped you as well.

    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Thank you all for your guidance and participation in this thread.

    Unfortunately, I don’t want to migrate the entire database. Because the source site’s database has a lot of useless data and is very unoptimized. I only want to migrate the data I need. As I said before, all the data I extracted using database queries was successfully migrated to the destination site. But when I migrated the products using WooCommerce, the IDs changed and it didn’t show the orders for the purchased products.

    I’m still trying to find a way to just move the products properly. Then everything will work fine.

    Thanks again

    Stef

    (@serafinnyc)

    Hey @hoseinkh

    Trying to migrate only part of the data while expecting everything to stay perfectly linked is like trying to fit a square peg into a round hole. You either migrate everything cleanly or end up manually fixing broken relationships. I get your concern about useless data, but what’s stopping you from cleaning that up before migrating?

    As both I and @saivutukuru mentioned, your best option if you are not doing a full database migration is to use WP All Import Pro with the required add-ons or a service like WP Migrate DB Pro or BlogVault. These give you more control over IDs and help preserve relationships.

    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Very good. Thanks for the advice @serafinnyc

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi @hoseinkh

    Since you found Stef’s suggestion helpful, I’m going to mark this thread as resolved.

    Also, I can confirm that what Stef suggested is the best approach to achieve that. If you’re uncomfortable doing it yourself, you might consider reaching out to a developer for assistance.

    I can recommend WooExperts and Codeable.io as options for getting professional help.

    Thank you

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.