Skip to content


How-to Guides

Technical References

Enterprise Search /

Enable Enterprise Search in code

This step enables Enterprise Search integration with the default allow lists.

Code changes required

Add the following constant defines to vip-config.php (which is equivalent to adding them to wp-config.php)

define( 'VIP_ENABLE_VIP_SEARCH', true );

If you are indexing a multisite, also add

define( 'EP_IS_NETWORK', true );

This should be all you need to do to have Elasticsearch (ES) index your content and offload standard (search) queries.

If you previously used Jetpack Search, the es-wp-query adapter, or another variant of ES, you’ll also need to remove them.

Disable and remove all other Elasticsearch-backed functionality. WordPress VIP’s Enterprise Search uses forks of es-wp-query and ElasticPress that are loaded automatically. No other Elasticsearch backed functionality is supported while Enterprise Search is enabled.

If there are conflicts, PHP warnings or notices should be issued; check New Relic’s error logs for these.

If you are converting from standard WordPress search or Jetpack Search to WordPress VIP’s Enterprise Search, and your site is already live and serving traffic, you can avoid search downtime by enabling just Enterprise Search first (with VIP_ENABLE_VIP_SEARCH), which will start indexing new changes without affecting Jetpack.

Then continue to follow this guide to set up your allow lists and indexes. Once those are ready and reporting good health, you can remove the Jetpack Search related items noted above. Enabling VIP_ENABLE_VIP_SEARCH_QUERY_INTEGRATION will then send queries to Enterprise Search.

If you’re on a multisite, it’ll be easier and more reliable to set up all subsites at the same time. Also, review our tips for multisites.

Last updated: May 18, 2021