Today I had a phone call from a client who was confused between the staging and production version of the website. Therefor the client added about +100 new products at de staging version. Usually I’m very sceptic about exporting and importing partial data into a website. Changes are always that content get’s scrambled. But I thought “Why not give the export and import tool of WooCommerce a try?”
Exporting products from the staging version
This step was quite easy. Just head on to the WooCommerce Products section an hit the ‘Export’ button on top of the page. WooCommerce will ask you how you would like to export the products. Just keep all default export settings but also activate the metadata checkbox. After hitting the export button WooCommerce will export and download a CSV file. Now let’s head on to the production version.
Importing products onto the production version
The importing procedure is also quite straight forward. In the products section of WooCommerce just click the ‘Import’ button. WooCommerce will give you some options. Important to notice here is that by activating the ‘SKU/ID’ you have the best change that the import is going to be successfully and you don’t end up with duplicate or missing content. Please be aware that the import taks is going to take some time. On my part it took about 15 minutes of runtime what’s really long. In the end I got some serious errors.
The final solution
The only and final solution was by deleting all the products on de production version and importing all the products from the CSV file. This way the import went smoothly. Any tips on getting the import function to work with checking the ID/SKU numbers is welcome in the comments below. I’m looking forward to your reply.
- Don’t try this directly on the production version. Use a local development version (as I did)
- Always make a backup of the production version is case something goes wrong
- And last but not least; inform the client not to make the same mistake again