Skip Navigation
May 24, 2022

ElasticPress plugin adds more robust search, indexing, and filter options to WordPress. Learn how to use WPML’s free ElasticPress glue plugin to make it work on your multilingual site.

The WPML ElasticPress glue plugin does the following:

  • Adds a language parameter to be able to filter search by language
  • Adds extra parameters to CLI commands to allow indexing of only specific languages

This makes it easier for your users to find what they’re looking for in the language they need. It also prevents the search results from displaying results in a mix of languages.

Getting Started

Start by installing and activating the following:

  • ElasticPress plugin
  • WPML core plugin and WPML String Translation add-on
  • WPML’s ElasticPress glue plugin

To download WPML’s ElasticPress glue plugin, please visit our GitHub repository. Download the file and upload it to your site.

If you’re new to WPML, check out our Getting Started Guide.

Using the ElasticPress Glue Plugin

Once the plugin is installed, re-index your posts. You can do this either through the WordPress admin, or using the following command: 

<code>wp wpml_elasticpress index --setup --post-type=post</code>

When the re-indexing is complete, you’ll see relevant search results in each of your site languages.

Indexing Only Posts From Specific Languages

The ElasticPress glue plugin also allows you to only index posts in specific languages. To do this:

  1. Remove any posts that have already been indexed by using the command wp elasticpress delete-index
  2. Index posts for a given language (in this example, it’s English): wp wpml_elasticpress index --setup --post-type=post --post-lang=en
  3. If you check your site’s front-end now, you’ll see only English posts in the search results on the English site. If you switch languages, the search results should be empty.

If you would like to index additional languages, repeat step 2. Be sure to skip the –setup argument, otherwise you will remove the posts that have already been indexed). For example, you could use this: wp wpml_elasticpress index --post-type=post --post-lang=fr

Known Issues

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

Getting Help From Our Support

In case you need help using ElasticPress on your multilingual site, visit WPML’s support forum.


Don’t have WPML yet? You can test WPML for 30 days and see if you like it.

If you are not happy with our plugin, we refund you without any questions in the 30 days.