Importing from WooCommerce
Bring products, variants and photos across from a WooCommerce shop with the command-line importer.
What it brings across
The importer reads your old shop's public product data: simple and variable products, variants, SKUs, prices and sale prices, stock, categories, makers, photos and variant photos. It doesn't need a key.
It can't bring orders or customers. WooCommerce doesn't share those publicly.
Before you start
- Your new shop must already exist. See Installing Vexon Commerce.
- Every price in the old shop must be in your new shop's base currency, or the importer stops.
- Storage must be set up, unless you skip photos with
--skip-images.
Import
- 1
Do a dry run
It only shows what it would do. Use your shop's slug and your old shop's address.
Terminal$ docker exec -it vexon-commerce npm run import:woocommerce -- \ --site your-shop --source https://old-shop.example.com - 2
Check the options
Some defaults were made for one shop. Check these before you write anything:
OptionWhat it doesExample--maker-parentThe old category whose sub-categories become makers. Set it to yours.
--maker-parent brands--geo-ipPretends to be a visitor from this IP, for shops whose prices change by country. Use
noneif yours don't.--geo-ip none--unmanaged-stockStock to give in-stock items the old shop doesn't count. Defaults to 1.
--unmanaged-stock 0--skip-imagesLeaves photos behind.
--skip-images--saveSaves what it read, so you can import later with
--frominstead of--source.--save old-shop.json - 3
Import for real
Add
--apply. Inside the container you also need--i-know, which confirms you mean to write to a database that isn't on this computer.Terminal$ docker exec -it vexon-commerce npm run import:woocommerce -- \ --site your-shop --source https://old-shop.example.com \ --maker-parent brands --apply --i-know - 4
Rebuild search
Terminal$ docker exec vexon-commerce npm run search:reindex
Running it again
It's safe to run again. Products are matched to the ones it brought across before, and only changes are written. Stock isn't overwritten once the shop is tracking it. Products deleted from the old shop are listed but left as they are.