Skip Navigation
Originally written
October 20, 2015
Updated
November 19, 2020

WP All Import plugin allows you to import posts, pages, WooCommerce products, and other custom post types in bulk from CSV files. You can also import content in multiple languages.

Required Plugins

To import multilingual content, you need to have the following installed:

* If you want to import WooCommerce products, you will also need WooCommerce Add-On Pro.

How to import your multilingual content

It’s important to follow this exact process when importing posts, pages, and WooCommerce products:

  1. Prepare your CSV files for importing
  2. Add a unique identifier
  3. Create your taxonomies in WordPress
  4. Import the default language file
  5. Import the secondary language file

This article also covers:

Preparing your CSV files

Create a spreadsheet to contain your default language post titles and content, and save it as a CSV file. Give it a meaningful filename, as this will help identify the file from a list later in the process:

Sample default language CSV prepared for importing
Sample default language CSV prepared for importing

Prepare separate spreadsheets for each additional language:

Sample separate CSV file in a secondary language
Sample separate CSV file in a secondary language

Adding a unique identifier column

When you import the files later, WP All Import will need a way to match the default language posts to their corresponding translations in the other files.

To do this, you need to specify a unique identifier for each post. Assign an ID number to one of your posts in your default language. Then, use that same ID number for the same post in your secondary language files. By looking at this ID, you can tell which post is the translation of another by finding the same ID number in your files.

For example, in the screenshots above, you can see that, “Hello World!” has a Polish translation of “Witaj świecie!” because they have the same unique identifier.

Create your taxonomies

If you are importing posts with taxonomies (categories, tags, or custom taxonomies), you must create the exact same taxonomies in your WordPress site before importing the post files. This can be done in two ways:

  1. Create the terms manually and translate them. Make sure the terms that you create in both your default and secondary languages match the terms you use in your CSV files exactly. If you have a lot of terms to translate, you can .
  2. Import the terms using WP All Import. To do this, prepare new CSV files to import the taxonomies and their translations. Add the unique identifier column to all CSV files to link each taxonomy term with its translation. You can follow WP All Import’s guide on importing taxonomies, but be sure to set the import language as described in the section later in this article.

Each time you import posts with taxonomies, you need to create the taxonomy terms first, then import the posts. Once the taxonomy terms and translations exist and match the terms in your CSV file, WP Import will be able to set the correct taxonomy for posts you import.

Matching taxonomy translations after import

As previously stated, we highly recommend creating your taxonomy terms and translations before importing your CSV files. If you do not create your taxonomies before importing your CSV files, your secondary language taxonomy terms will not be connected as translations of the default language terms. You will need to edit each of your translated taxonomy terms to match them with the correct default language taxonomy term.
To do this:

  1. Go to Posts → Categories (or whichever taxonomy type you are correcting).
  2. Switch to your secondary language using the language switcher at the top of the page.
  3. Edit the taxonomy term you need to fix.
  4. Editing a taxonomy term in a secondary language
    Editing a taxonomy term in a secondary language
  5. At the bottom of the page, choose which default language taxonomy term the current term is a translation of.
Mapping a translated taxonomy term to its default language value
Mapping a translated taxonomy term to its default language value
Please note: Taxonomy terms should never have the exact same name in the default and secondary languages. Otherwise, the import of the translated terms will not function properly. If terms have the same name in multiple languages, it is recommended that you change the translated terms to something else before import. After successful import, you can change the translated term back to be the same as the default language term.

How to import posts

Once your taxonomies and their translations are in place, you are ready to import your CSV files. Be sure to import your default language files first, followed by your secondary language files. We will summarize the steps below. For more detailed documentation, please see WP All Import’s article on how to import files.

First, import the default language file

To import your default language file:

  1. Go to WP All Import → New Import, and click Upload a file to upload your default language CSV file. Choose whether you are uploading new or existing items, and what type of element you are importing.
  2. On the next screen, you can review each row in your CSV file. If it all looks correct, click Continue to Step 3.
  3. Map your column titles from the right sidebar to the correct fields by dragging and dropping them. Expand the WPML All Import metabox and choose your default language. Then, click Continue to Step 4.
  4. Mapping the default language fields in the WP All Import wizard
    Mapping the default language fields in the WP All Import wizard
  5. Map the unique identifier to the correct element in your CSV or XML file. Click Continue to view a summary of your import, then click Confirm & Run Import to import your default language posts.
Setting the unique identifier value
Setting the unique identifier value

Next, import the secondary language file

Repeat the import process with your secondary language file with a few of exceptions:

  1. In the WPML All Import metabox, choose the correct secondary language.
  2. Expand the Automatic Record Matching to Translate section and select the file that you used to import the default language posts.
  3. Drag the field that you are using as the unique identifier to the Unique Identifier field. This field and the Unique Identifier field on the next screen needs to be the same as the one you chose during the default language import.
Setting the secondary language, parent import, and unique identifier
Setting the secondary language, parent import, and unique identifier
Setting the same unique identifier for the secondary language
Setting the same unique identifier for the secondary language

This import will create posts in secondary languages and connect them as the translations of the default language.

Adding translations when the default language content already exists on the site

Because WP All Import relies on the unique identifier to connect translated posts with their corresponding default language post, you cannot upload the secondary language file to add translations to pre-existing default language content. If you do this, WP All Import will not know which posts the translations belong to.

To add translations when default language content already exists on the site:

  1. Export your default language content using WP All Export.
  2. Edit the newly created CSV to add a column for the unique identifier.
  3. Import this default language file with the new column, being sure to use the Update option.

Once the default language file has been imported, you can continue with your secondary language file as previously explained.

How to import WooCommerce products

You can import WooCommerce simple products by following the process described above.

If you need to import WooCommerce variable products, there are some additional steps. Follow WP All Import’s tutorial for instructions on how to import variable WooCommmerce products. Don’t forget to add the Unique Identifier column!

You can then import your translations the same way, paying close attention to the extra considerations as outlined in the tutorial. Be sure to create all your product taxonomy terms and translations before importing your CSV files.

How to translate and import product taxonomies

You can create your product taxonomies in the same way you create and translate taxonomies for posts and pages. Once the taxonomies and their translations have been created, you can import your products.

How to manually import products with set prices for other currencies

To import products with manually set prices for other currencies, make sure to set the relevant fields in the WooCommerce Add-On section for the default language import. This includes the regular price and sale price.

Setting the WooCommerce import fields

Additionally, you need to add the following custom fields in the default language import in order for the set prices to show correctly on the secondary language products’ pages. In our example, we have manually set prices for products in Euros. Hence, we have added the following custom fields:

  • _regular_price_EUR
  • _sale_price_EUR
  • _price_EUR
  • _sale_price_dates_to_EUR
  • _sale_price_dates_from_EUR
  • _wcml_schedule_EUR
  • _wcml_custom_prices_status
Adding the custom fields

As you may have noticed, some of the custom fields have the suffix _EUR. Depending on the currency you have set prices for, you need to change this suffix to match the currency code. You can get any currency code by navigating to WooCommerce → WooCommerce Multilingual. Go to the Multi-currency tab and click on the Add currency button. There, select the currency to get its code.

Getting the currency code

If you are importing products in more than one language and they all have manually set prices for all other currencies, make sure to add custom fields associated with all the currency suffixes.

Exporting posts

WPML and WP All Import do not have an option to export posts from a WordPress installation; this is out of scope for these plugins.

We do not recommend using the standard WordPress option to export content to XML files (Tools → Export). You will have to split those files into many (one for each language) and add an XML element with a Translation Group ID. XML files are not easy to edit, so it can be a lengthy process.

If you want to save a backup of your posts, we recommend using an export plugin like WP CSV Exporter, WP CSV, or WP All Export. These plugins export CSV files, which make it easier to split files per language and add information about the Translation Group ID.

You can do this manually. However, if you are a programmer, you can parse those files in PHP. For every row, you can check the translation of the given post using the .

Importing a custom database design into WordPress

Migrating from a custom database with different tables into WordPress can be a challenging task. Fortunately, you can accomplish this using Toolset plugins and WP All Import. Check Toolset’s guide on importing a database into WordPress. The video below illustrates the migration process in details:

Getting help

In case you need help using WPML All Import, visit WPML’s support forum.