Skip to content

Instantly share code, notes, and snippets.

@haze83
Last active April 23, 2025 16:28
Show Gist options
  • Save haze83/703a02acbb5c8200421056a1d3f04956 to your computer and use it in GitHub Desktop.
Save haze83/703a02acbb5c8200421056a1d3f04956 to your computer and use it in GitHub Desktop.
WP/WC Plugins

Import / Export

Export / import users

Install plugins

On both systems: https://wordpress.org/plugins/wp-ultimate-csv-importer/

wp plugin install https://downloads.wordpress.org/plugin/wp-ultimate-csv-importer.zip --activate

On the source system: https://wordpress.org/plugins/wp-ultimate-exporter/

wp plugin install https://downloads.wordpress.org/plugin/wp-ultimate-exporter.1.4.zip --activate

https://wordpress.org/plugins/users-customers-import-export-for-wp-woocommerce/

wp plugin install https://downloads.wordpress.org/plugin/users-customers-import-export-for-wp-woocommerce.1.0.7.zip --activate

On the target system: https://wordpress.org/plugins/import-users/

wp plugin install https://downloads.wordpress.org/plugin/import-users.1.1.zip --activate

maybe for products? https://wordpress.org/plugins/import-woocommerce/

Export customer data

On the source system:

  1. Goto "Users / User Import Export"
  2. Choose User Roles "Customer"
  3. Select all Columns
  4. Click Export Users
  5. Goto "Users / Export User Data"
  6. Click select "All" under User Meta Fields
  7. Select Format "CSV"
  8. Select Role "Customer" (under Advanced Options)
  9. Click "Run Export"

Merge customer data manually

Fire up MS Excel:

  1. Import both csv files as UTF-8 with delimiter ","
  2. Select and copy all missing columns
  3. Paste into the other sheet
  4. Save as CSV UTF-8

Import customer data

On the target system:

  1. Goto "Ultimate CSV Importer Free / Import / Update"
  2. Upload csv file
  3. Choose "New Items" and "Users"
  4. Mapping the fields (shipping_email, shipping_phone)
  5. Click "Continue"
  6. Deselect all options
  7. Click "Continue"
  8. Click "Import"

Export / Import orders

Install plugins

On both systems: https://wordpress.org/plugins/order-import-export-for-woocommerce/

wp plugin install https://downloads.wordpress.org/plugin/order-import-export-for-woocommerce.1.2.5.zip --activate

Export orders

On the source system:

  1. Goto WooCommerce / Order Im-Ex
  2. Click "Export Orders"
  3. Save on your computer

Import orders

On the target system:

  1. Delete all orders
  2. Renumerate to 1
  3. Disable renumerate feature
  4. EDIT: now it's a good time to activate the hook
  5. Goto WooCommerce / Order Im-Ex
  6. Click "Import Orders"
  7. Choose csv file from your computer
  8. Click "Upload file and import"
  9. set renumerate to 50000
  10. activate renumerate feature
  11. EDIT: deactivate the hook

Pros

  • Users keep their password
  • Almost any user data is migrated

Cons

  • A bit an overhead
  • Orders get a new order number (with note for the old one)
  • Orders can not be found by the old order number
  • If on the target system are any existing order numbers, it fails with a message
  • There is no link left to the original product art no

Edit

use this hook while importing the old data in your new system:

	add_action('woocommerce_set_order_number', function($order, $order_number, $order_number_formatted) {
		update_post_meta($order->get_id(), '_alg_wc_custom_order_number', $order_number);
	}, 10, 3);

Notes

  1. cimy https://wordpress.org/plugins/cimy-user-manager/ --> only basic user data, no passwords
  2. Export & Import from here https://wordpress.org/plugins/export-user-data/ and https://wordpress.org/plugins/import-users-from-csv-with-meta/ --> those plugins don't have compatible csv declarations
  3. WOOEXIM --> lot of notices and products only
  4. Woo Imp Exp --> lot of notices and lite version does nothing at all!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment