WP VIP Search
Part of the Sidecar Services catalog.
What it does
wpvip-search mirrors WP VIP Enterprise Search locally. VIP's Enterprise Search runs ElasticPress against an Elasticsearch backend, so this preset gives a WP VIP project the same engine on your machine. Add it when you are developing a VIP site that uses Enterprise Search and want queries served by a real Elasticsearch instance rather than the WordPress default.
Use this preset rather than the generic elasticsearch one when the project is a VIP site: it pins the version VIP runs and injects the VIP and ElasticPress env vars.
How it works
The preset pins docker.elastic.co/elasticsearch/elasticsearch:7.10.2. VIP pins the 7.10.x line, so this preset matches that version rather than the generic elasticsearch 8.x preset. It listens on container port 9200, runs as a single node with security disabled (discovery.type=single-node, xpack.security.enabled=false) and a 512m heap, and persists its index in a named volume mounted at /usr/share/elasticsearch/data.
It gets a browser UI: the host port is auto-allocated from the 7000 to 7999 range and de-conflicted across all projects.
wdg my-site service add wpvip-search
wdg my-site service listRead the browser URL from the service list output.
How it integrates with the local WordPress container
Adding the sidecar injects these env vars into the WordPress container:
| Variable | Value |
|---|---|
EP_HOST | http://wdg-my-site-wpvip-search:9200 (the @HOST token resolved at add-time) |
VIP_ELASTICSEARCH_ENDPOINTS | http://wdg-my-site-wpvip-search:9200 |
VIP_ELASTICSEARCH_USERNAME | empty |
VIP_ELASTICSEARCH_PASSWORD | empty |
WordPress reaches the engine over wdg-network at wdg-my-site-wpvip-search:9200, never the host port. The host port exists only for your browser. The username and password are intentionally empty because the local node runs with security disabled.
Unlike the other search presets, this one needs project-side wiring. The sidecar provides the engine and the connection env only. The project must still:
- install ElasticPress /
vip-go-mu-pluginsin its codebase, and - bridge the injected env vars to the matching PHP constants in
wp-config.phpor an mu-plugin.
The injected env carries the connection details, but VIP and ElasticPress read PHP constants, so the project maps one to the other. The VIP_ELASTICSEARCH_ENDPOINTS constant expects a serialized array of endpoints:
// wp-config.php (or an mu-plugin)
if ( getenv( 'EP_HOST' ) ) {
define( 'EP_HOST', getenv( 'EP_HOST' ) );
}
if ( getenv( 'VIP_ELASTICSEARCH_ENDPOINTS' ) ) {
define( 'VIP_ELASTICSEARCH_ENDPOINTS', array( getenv( 'VIP_ELASTICSEARCH_ENDPOINTS' ) ) );
define( 'VIP_ELASTICSEARCH_USERNAME', getenv( 'VIP_ELASTICSEARCH_USERNAME' ) );
define( 'VIP_ELASTICSEARCH_PASSWORD', getenv( 'VIP_ELASTICSEARCH_PASSWORD' ) );
}Project-side wiring required
Adding the sidecar does not install the plugins or write the bridge. Without ElasticPress / vip-go-mu-plugins and the constant bridge above, WordPress can reach the engine but will not use it for search.
Add and remove
wdg my-site service add wpvip-search
wdg my-site service remove wpvip-search # keeps the data volume
wdg my-site service remove wpvip-search --purge # also deletes the data volume