Migrate WooCommerce Orders [closed]

I need to export/import all WooCommerce orders from a clients old website to their new website. We basically took their website, redesigned it but the install and everything is the same – besides there being two versions and both are on different servers. We tried replacing postemta and posts but that messed up EVERYTHING, like the pages, menus, etc.

We are on a tight deadline (every moment is crucial) and we need help on this. We are aware of the plugins, but if there is a dirty way to do it we are open to it.

To reiterate: we need to move just the orders from one site to another without messing everything else up.

Thanks in advance!

1 Answer
1

The reason copying those messed up your site was probably because of id mismatches. That is, posts with the ids of the stuff you’re importing already exists.

Regardless, since woocommerce stores orders as a custom post type, your safest bet here is probably the built in wordpress post import/export tool.
1. In the wordpress backend for the old site select Tools->Export
2. Choose “Orders”
3. Download the export file.
4. In the wordpress backend for the new site select Tools->Import
5. Click “WordPress” (install the plugin if you need to).
6. Choose/Upload the file you created in step 3.

If you need to do this through SQL for some reason, the place to start will be with

SELECT * from wp_posts WHERE post_type="shop_order"
Then you’ll need to export the result of that query and increment all of the IDs by whatever the auto increment value is on the new table. But that will give you a pretty messy table…

Leave a Comment