Title: Enable Enterprise Search features
Author: WordPress VIP Documentation
Published: March 10, 2021
Last modified: May 30, 2025

---

 1. [Enterprise Search](https://docs.wpvip.com/enterprise-search/)
 2. Enable Enterprise Search features

#  Enable Enterprise Search features

Several features built into Enterprise Search can be enabled with the command `wp
vip-search activate-feature`. Run the command with [VIP-CLI](https://docs.wpvip.com/vip-cli/),
for example:

    ```wp-block-preformatted
    vip @<app-name>.<env> -- wp vip-search activate-feature <feature-slug>
    ```

To disable a feature, use the command `wp vip-search deactivate-feature`:

    ```wp-block-preformatted
    vip @<app-name>.<env> -- wp vip-search deactivate-feature <feature-slug>
    ```

Retrieve a list of the features that are currently enabled for a site with the command`
wp vip-search list-features`:

    ```wp-block-preformatted
    vip @<app-name>.<env> -- wp vip-search list-features
    ```

Retrieve a list of all available features by passing the `--all` option with the
command `wp vip-search list-features`:

    ```wp-block-preformatted
    vip @<app-name>.<env> -- wp vip-search list-features --all
    ```

## Limitations

ElasticPress features that cannot be enabled for Enterprise Search:

 * Autosuggest
 * Comments
 * Documents
 * Instant Search

For WordPress multisite environments, features cannot be toggled on a global network
basis. Enterprise Search features must be enabled or disabled on a per-network site
basis by using the `--url` parameter. For example, if a multisite has two network
sites—ID 1 and ID 2—and the `protected_content` feature is enabled only for site
ID 1, it will **not** be enabled for site ID 2.

**VIP-CLI command examples**

For demonstration purposes, the `<app-name>` value `example-app` and the `<env>`
value `develop` are used in the VIP-CLI command examples below. Read more about 
[how to target environments in VIP-CLI commands](https://docs.wpvip.com/vip-cli/target-environments/).

## Facets

_Feature slug:_ `facets`
_Default: Enabled_

When enabled, the Facets feature adds an ElasticPress Facets widget to the list 
of available widgets in the WordPress Admin. The Facets widget displays [term aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html)
in a sidebar or any widgetized area. The taxonomies included in [aggregations must be code configured](https://docs.wpvip.com/enterprise-search/customize-search-results/#h-aggregation).

Example command to deactivate the `facets` feature:

    ```wp-block-preformatted
    vip @example-app.develop -- wp vip-search deactivate-feature facets
    ```

## Protected content

_Feature slug:_ `protected_content`
_Default: Disabled_

To enable indexing of non-public content (private post types and statuses) and [send **all** non-AJAX WordPress admin queries to Elasticsearch](https://docs.wpvip.com/vip-search/enable-for-wp-admin/),
this feature must be activated. Once activated, a re-index (or versioning) will 
be necessary.

**Caution**

Once enabled, there is a risk of exposing non-public content to unauthorized users.
Test all queries carefully.

Example command to activate the `protected_content` feature:

    ```wp-block-preformatted
    vip @example-app.develop -- wp vip-search activate-feature protected_content
    ```

## Related posts

_Feature slug:_ `related_posts`
_Default: Disabled_

The `vip_es_get_related_posts` helper function returns related posts on a post ID.
By default, **the related posts feature will not function for custom post types**,
even if the custom post type is indexed. The `ep_find_related_args` filter can be
used to modify the **WP_Query** parameters to return related posts for custom post
types.

Example command to activate the `related_posts` feature:

    ```wp-block-preformatted
    vip @example-app.develop -- wp vip-search activate-feature related_posts
    ```

## Search

_Feature slug:_ `search`
_Default: Enabled_

Queries with an `s` parameter will be automatically sent to Elasticsearch and searched
against `post_title`, `post_content`, and `post_excerpt`. This is highly beneficial
because the default MySQL behavior, fulltext search with `LIKE` clauses, can result
in poor database performance.

To **prevent** this behavior and force the query to go to MySQL, set both the `es`
and `ep_integrate` **WP_Query** parameters to _false_.

**Caution**

If the `search` feature is deactivated, search will not be offloaded to Enterprise
Search. Deactivating `search` is not recommended and can result in negative impact
to a site’s performance.

Example command to deactivate the `search` feature:

    ```wp-block-preformatted
    vip @example-app.develop -- wp vip-search deactivate-feature search
    ```

## Search ordering

_Feature slug:_ `searchordering`
_Default: Disabled_

This feature allows for the customization of results returned on search terms, where
results can be manually added or re-ordered. After this feature is enabled, [custom search results can be configured in the site’s WordPress Admin dashboard](https://elasticpress.zendesk.com/hc/en-us/articles/360050962172-Configuring-Custom-Search-Results).
Access the customization panel by selecting _Enterprise Search > Custom Results_
in the lefthand navigation menu.

Example command to activate the `searchordering` feature:

    ```wp-block-preformatted
    vip @example-app.develop -- wp vip-search activate-feature searchordering
    ```

## Terms

_Feature slug:_ `terms`
_Default: Disabled_

Activating this feature enables the [terms Indexable](https://docs.wpvip.com/vip-search/choose-what-to-index/#h-terms).

Example command to activate the `terms` feature:

    ```wp-block-preformatted
    vip @example-app.develop -- wp vip-search activate-feature terms
    ```

After the `terms` feature is activated, enable the [mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html)(
via the `--setup` flag) and index just the terms:

    ```wp-block-preformatted
    $ vip @example-app.develop -- wp vip-search index --indexables=term --setup                                                               
    ⚠️  You are about to run a destructive operation. Are you sure? [y/n] y
    Indexing with setup option needs to delete Elasticsearch index first, are you sure you want to delete your Elasticsearch index? [y/n] y
    Adding term mapping...
    Success: Mapping sent
    Indexing terms...
    Processed 1/1. Last Object ID: 1
    Number of terms indexed: 1
    Total time elapsed: 0.504
    Success: Done!
    ```

## Users

_Feature slug:_ `users`
_Default: Disabled_

Activating this feature enables the [users Indexable](https://docs.wpvip.com/indexing-user-meta/).

Example command to activate the `users` feature:

    ```wp-block-preformatted
    vip @example-app.develop -- wp vip-search activate-feature users
    ```

After the `users` feature is activated, enable the [mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html)(
via the `--setup` flag) and index just the users:

    ```wp-block-preformatted
    $ vip @example-app.develop -- wp vip-search index --indexables="user" --setup
    ⚠️  You are about to run a destructive operation. Are you sure? [y/n] y
    Indexing with setup option needs to delete Elasticsearch index first, are you sure you want to delete your Elasticsearch index? [y/n] y
    Adding user mapping...
    Success: Mapping sent
    Indexing users...
    Processed 1/1. Last Object ID: 1
    Number of users indexed: 1
    Total time elapsed: 0.170
    Success: Done!
    ```

## WooCommerce

_Feature slug:_ `woocommerce`
_Default: Disabled_

When enabled, the WooCommerce feature will run all critical WooCommerce queries 
through Elasticsearch instead of MySQL making it possible to render pages and process
complex ecommerce filters very fast.

Example command to activate the `woocommerce` feature:

    ```wp-block-preformatted
    vip @example-app.develop -- wp vip-search activate-feature woocommerce
    ```

Last updated: May 30, 2025