How to import and export your WooCommerce shipping zones, methods, and location from one site to another.

FREE EXPORTER PLUGIN HERE : http://rynaldo.com/free-plugin-woocommerce-shipping-exporter/

You have dozens of shipping zones configured in your WooCommerce site and you would like to “duplicate” this to a new WooCommerce site, without having to create each shipping zone individually, from scratch. This could take hours depending on the amount of zones you have set up. You might need to make a few shipping zone changes, too, before importing them to your new site.

Currently, there is no default feature within WooCommerce core that would allow you to export your zones, or to duplicate them to a new site.

So, how exactly are we going to achieve this? I’m glad you asked!

What you’ll need:

WP CSV to Database plugin

Exporting the correct tables:

Please note that the following process has to be done individually for each one of the tables. There are 3 tables you need to export and they are as follows:

woocommerce_shipping_zones
woocommerce_shiping_zone_methods
woocommerce_shipping_zone_locations

Let’s begin!

First, make sure you install and activate the plugin linked above, then:

  1. Open the plugin settings here:

2. Click here to select the table you are exporting FROM:

Once you have selected the table, go ahead and click the “Export to CSV” button:

The CSV file will now be downloaded directly to your computer.

DO THIS FOR ALL 3 TABLES MENTIONED ABOVE, SO THAT ALL 3 TABLES ARE DOWNLOADED TO YOUR PC.

You are now ready to import your shipping zones to the new site.

Importing your shipping zones tables (to the new site):

  1. Open the plugin settings (as seen in Step 1 above)
  2. Select the database table you are importing TO
  3. Click here to upload the corresponding input file:

4. Choose the file, then click the “Upload” button:

5. On the next screen, click the “File URL” button, followed by the “Insert into post” button:

6. Select the “update database rows” checkbox here:

7. Click the “Import to database” button here:

Done! The table has now successfully been imported to your database.

DO THIS FOR ALL 3 TABLES MENTIONED ABOVE, SO THAT ALL 3 TABLES ARE IMPORTED TO THE NEW SITE AND DATABASE.

The final step. Importing the actual method rates.

By default, the method rates are not stored in the tables we have already exported or imported. This data is saved in the wp_options table, so we will need to manually extract these rates from there. This is what it looks like:

The first step from here would be to log into your phpmyadmin and to select the database you are exporting the rates FROM. Once in, please select the “Search” tab as seen below, and follow the screenshots from there. Let’s begin!

Now, follow the steps exactly as you see in the screenshot below:

Now, click the “browse” button for the wp_options table, here:

This is where you can now select all the rate methods rows for your shipping rates. Once you’ve selected them all, click the “export” button:

The next few steps, before exporting and importing the rates are important. Please make sure your settings match exactly what you see in the screenshots to follow.

You can now click the “go” button and the already formatted CSV file will be downloaded directly to your PC. It will also already be formatted correctly for import, so you can go ahead and go back to the import settings and import this CSV to your wp_options table, the same way you imported the previous CSV files.

Remember to check the “Update database rows” here when importing the file.

That’s all! You have now successfully exported all your shipping zones from one site to another. This includes the zones, methods, locates, and method rates.

You can use the same steps as outlined here to export and import your data for Table rate shipping, too, alongside the shipping zone data. However, there is no need to manually extract the data from the wp_options table here as this will already be included in the tables.

5 thoughts on “How to import and export your WooCommerce shipping zones, methods, and location from one site to another.

  1. Thank you for this post! It’s been helpful but for the final stage.

    “wp_options.csv” has failed to upload.
    Sorry, this file type is not permitted for security reasons.

  2. Although I copied the steps using Adminer, the process works like a charm in WooCommerce 5.0.0 running on WordPress 5.6.2
    I’m using the WooCommerce Table Rate Shipping 3.0.30
    Since all my shipping rates are made using the Table Rate option, I just exported the wp_options records where option_name like ‘%table_rate%’

  3. My God, thank you for this very detailed tutorial. I was pulling my hair out trying to figure out how to get all my shipping rates onto my new site!

Share your thoughts

Your email address will not be published. Required fields are marked *