### Start Local Environment and Install Dependencies Source: https://github.com/10up/elasticpress/blob/develop/tests/e2e/README.md Commands to start the local WordPress environment, install Node.js packages, build assets, and set up the initial database for end-to-end tests. ```bash npm run env:start npm i npm run build npm run e2e:setup ``` -------------------------------- ### Install and Build ElasticPress Assets Source: https://github.com/10up/elasticpress/blob/develop/README.md Run these commands to install Node.js dependencies and build assets for a development version of ElasticPress. Node.js v20 and npm v9 are required. ```bash npm install && npm run build ``` -------------------------------- ### Soft Reset Local Environment Source: https://github.com/10up/elasticpress/blob/develop/tests/e2e/README.md Command to clean the database and re-run the initial setup for end-to-end tests. ```bash npm run env:reset ``` -------------------------------- ### Setup E2E Environment with ElasticPress.io Source: https://github.com/10up/elasticpress/blob/develop/tests/e2e/README.md Script to set up the end-to-end testing environment using an ElasticPress.io endpoint, requiring host, credentials, and index prefix. ```bash ./bin/setup-e2e-env.sh --ep-host="https://" --ep-credentials="username:password" --ep-index-prefix="username" ``` -------------------------------- ### Install Shared Libraries on WSL Source: https://github.com/10up/elasticpress/blob/develop/tests/e2e/README.md Commands to install necessary shared libraries on WSL to resolve 'Error while loading shared libraries' issues. ```bash sudo apt update && sudo apt install libatk1.0-0 libatk-bridge2.0-0 libcups2 libgtk-3-0 libgbm-dev libasound2 xvfb ``` -------------------------------- ### Hard Reset Local Environment Source: https://github.com/10up/elasticpress/blob/develop/tests/e2e/README.md Commands to destroy the existing WordPress environment and restart it with initial setup. ```bash npm run env destroy npm run env:start && npm run e2e:setup ``` -------------------------------- ### Generate POT File Source: https://github.com/10up/elasticpress/blob/develop/CONTRIBUTING.md Use the WordPress CLI to generate the POT file for internationalization. Ensure Xdebug is disabled if errors occur. ```bash wp i18n make-pot . lang/elasticpress.pot ``` -------------------------------- ### Open Playwright UI Source: https://github.com/10up/elasticpress/blob/develop/tests/e2e/README.md Command to open the Playwright test runner UI for interactive test execution. ```bash npm run playwright:ui ``` -------------------------------- ### Rebuild Elasticsearch Docker Image for Platform Source: https://github.com/10up/elasticpress/blob/develop/tests/e2e/README.md Commands to down, then up and rebuild the Elasticsearch Docker Compose service, ensuring the correct platform image is used, especially on Apple Silicon. ```bash docker compose down docker compose up -d --build --force-recreate ``` -------------------------------- ### Set Display Environment Variables Source: https://github.com/10up/elasticpress/blob/develop/tests/e2e/README.md Environment variables to set for indirect GLX rendering, often used to resolve display-related issues in virtualized environments. ```bash export LIBGL_ALWAYS_INDIRECT=1 export DISPLAY=:0 ``` -------------------------------- ### Configure Elasticsearch Host on WSL Source: https://github.com/10up/elasticpress/blob/develop/tests/e2e/README.md Command to configure the Elasticsearch host for wp-env on WSL when encountering connection errors. ```bash ./bin/wp-env-cli tests-wordpress "wp --allow-root config set EP_HOST http://host.docker.internal:8890/" ``` -------------------------------- ### Push Trunk Branch to GitHub Source: https://github.com/10up/elasticpress/blob/develop/CONTRIBUTING.md Push the trunk branch to GitHub to trigger the build and tag action. ```bash git push origin trunk ``` -------------------------------- ### Merge Trunk into Develop with No Fast-Forward Source: https://github.com/10up/elasticpress/blob/develop/CONTRIBUTING.md After a hotfix is merged into trunk, use this command to merge trunk into the develop branch, ensuring no fast-forward to maintain history. ```bash git checkout develop && git merge --no-ff trunk ``` -------------------------------- ### Merge Release Branch into Develop Source: https://github.com/10up/elasticpress/blob/develop/CONTRIBUTING.md After merging the release branch into develop, perform a non-fast-forward merge into the trunk branch. ```bash git checkout trunk && git merge --no-ff develop ``` -------------------------------- ### Revert to Older Search Algorithm Source: https://github.com/10up/elasticpress/blob/develop/README.md If you need to use the search algorithm version from ElasticPress 3.4, add this filter to your WordPress site. This is a backwards compatibility measure. ```php add_filter( 'ep_search_algorithm_version', function() { return '3.4'; } ); ``` -------------------------------- ### Update Feature Settings Source: https://github.com/10up/elasticpress/blob/develop/readme.txt This REST API endpoint allows for updating feature settings programmatically. It is part of the ElasticPress API. ```APIDOC ## POST elasticpress/v1/features ### Description Allows for updating feature settings. ### Method POST ### Endpoint `/elasticpress/v1/features` ### Request Body - **feature_slug** (string) - Required - The slug of the feature to update. - **settings** (object) - Required - An object containing the new settings for the feature. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the update was successful. - **message** (string) - A message describing the result of the operation. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.