Skip Navigation
September 9, 2022

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.

On This Page

How to import your multilingual content:

This article also covers:

Getting Started

Start by installing and activating the following plugins:

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

New to WPML? Check out our Getting Started Guide. It quickly walks you through different translation options you can use.

If selected, WPML’s Translate Everything feature automatically translates all of your site’s current content as well as any new content that you create.

To manually import translations with the WPML All Import plugin, choose to Translate Some of your content. This option gives you the ability to choose which content you want to translate.

Before Importing

Before running an import, make sure to disable the option to “Increase speed by disabling do_action calls in wp_insert_post during import.” When enabled, this option can cause issues during the import process.

To do this, go to All Import → Manage Imports and click on the Settings link under your file. Then:

  1. Scroll down to the bottom of the page and expand the Configure Advanced Settings section.
  2. Uncheck the box next to Increase speed by disabling do_action calls in wp_insert_post during import.
  3. Click on the Save Import Configuration button.
Disabling the option before running an import

Prepare Your CSV Files for Importing

Create a spreadsheet containing your default language post titles and content and save it as either a CSV file or XML 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 additional language CSV prepared for importing

Add a Unique Identifier

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 in WordPress

If you are importing translated 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 check our guide on translating all taxonomy terms at once.
  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.
Editing a taxonomy term in a secondary language
Editing a taxonomy term in a secondary language
  1. 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

If your taxonomy terms have the exact same name in the default and secondary languages, the import of the translated terms will not function properly.

Before importing terms with the same name in multiple languages, we recommend renaming the translated terms to something else. After successful import, you can change the translated term name back to the same name as the default language term if needed.

Or, you can add a language code, like “-es” to the end of the taxonomy term in your secondary language. Then, choose the “Set slug manually” option and manually map the slug to the corresponding column in your spreadsheet.

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.
Mapping the default language fields in the WP All Import wizard
Mapping the default language fields in the WP All Import wizard
  1. 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 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. Delete the original content from the site.
  4. Import the default language CSV file with the unique identifier column. Make sure to import it as New items.

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

How To Import WooCommerce Products

WooCommerce Import Add-On Pro is required for importing simple and variable WooCommerce products. Once you have purchased WP All Import, you can find the link to download WooCommerce Import Add-On Pro on your WP All Import downloads page.

You can import WooCommerce simple products by following the process described above for creating taxonomies and importing posts.

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 Manually Import Products With Prices in 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

You also need to add the following custom fields in the default language import in order for the prices to show correctly on the product pages in secondary languages. 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

Depending on the currency you have set prices for, you need to change the suffix of several of the custom fields to match the currency code. To get the currency code:

  1. Go to WooCommerce → WooCommerce Multilingual.
  2. Go to the Multi-currency tab and click on the Add currency button.
  3. 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.

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 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, or 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 wpml_object_id filter.

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 out Toolset’s guide on importing a database into WordPress. The video below illustrates the migration process in details:

Known Issues

There are no unresolved compatibility issues between this plugin and WPML. Search all known issues.

Getting Help

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