Sites that are currently using Jetpack Search can transition to using Enterprise Search instead.
By following the steps outlined below, sites that are currently using Jetpack Search—and already launched and serving traffic—can avoid search downtime.
Enable Enterprise Search
- Enable Enterprise Search by adding the
vip-config.phpand defining it as
true. This will initiate the indexing of new, incremental changes without affecting Jetpack Search.
- Create an index for the existing site content.
- If needed, create allow lists to define what is indexed.
- Verify that the newly created index is reporting good health and test search queries.
It is recommended to look for any usages of the filters
jetpack_search_es_query_args in the codebase and modify them to use the equivalent
ep_formatted_args. Because the Elasticsearch queries are not 1:1 for Jetpack and Enterprise Search, any alterations that are made should be tested.
Transition to Enterprise Search
Once it is determined that the site is ready to transition off of its current Elasticsearch service into Enterprise Search.
- Add the
vip-config.phpand define it as
true. This will automatically send front-end search queries directly to Enterprise Search and disable the Jetpack Search module.
- Verify that Enterprise Search is sending its queries to Elasticsearch by using Search Dev Tools.
- Disable and remove all other Elasticsearch-backed functionality such as Jetpack Search, the es-wp-query adapter, or other variants of Elasticsearch. Enterprise Search uses forks of es-wp-query and ElasticPress that are loaded automatically. No other Elasticsearch-backed functionality can be supported while Enterprise Search is enabled.
- If application code was added to make search endpoint calls to the WordPress.com public API (e.g.
https://public-api.wordpress.com/rest/v1/sites/<site ID>/search), modify the code to use the WordPress core REST API instead. For example:
After transitioning to Enterprise Search, monitor for signs of conflicts, PHP warnings, or issued notices by using debugging tools such as
Jetpack migration support path
define( 'VIP_SEARCH_MIGRATION_SOURCE', 'jetpack' );
For sites that are using the
jetpack_sync_post_meta_whitelist filter, the constant
VIP_SEARCH_MIGRATION_SOURCE can be added to
vip-config.php and defined as
jetpack. Jetpack’s default post meta allow list, and the values that are being filtered will be used as a base in the post meta allow list.
Last updated: December 22, 2023