Product and Order Migration

Hello!

I want to develop a reliable method for migrating products, orders, and customers between a WooCommerce test and live systems. Ideally, I could automate the process. I prefer not to use plugins and would like to use a subset of the REST API, CLI, and SQL.

Currently, this is what I’m doing:

1. I migrate the products through the WooCommerce REST API, which is relatively straightforward, except that I need to copy the images via SFTP afterward.
2. I can update previous orders through the REST API similarly, but I cannot migrate new orders because no endpoint is available. There is only an endpoint for creating a new order, but it’s not the same ([https://woocommerce.github.io/woocommerce-rest-api-docs/#create-an-order](https://woocommerce.github.io/woocommerce-rest-api-docs/#create-an-order)). Therefore, I copy the new orders using SQL.
3. I also copy the new customers using SQL because the REST API doesn’t have a filter that returns only the new customers after a specific date ([https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-customers](https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-customers)).

I tried copying the products using SQL, but I found that if the appearance of the product page has changed in the meantime, the page layout breaks. So, this isn’t a viable solution.

How can I do this more efficiently, using solely the REST API or SQL (or perhaps CLI)?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer