WPSolr logo
  • Brands & Agencies 💛
  • Products
    • Parsing & Chunking
    • Search
      • Algolia  Search
      • Apache Solr  Search
      • Elasticsearch  Search
      • Google AI Commerce  Search
      • OpenSearch  Search
      • OpenSolr  Search
    • AI Search
      • OpenSearch  AI Search
      • PostgreSQL  AI Search
      • Vespa  AI Search
      • Weaviate  AI Search
    • AI Recommendations
      • Amazon Personalize  AI Recommendations
      • Recombee  AI Recommendations
    • AI Personalized Search & Recommendations
      • Algolia  AI Personalized Search & Recommendations
      • Google AI Commerce  AI Personalized Search & Recommendations
  • Learn
    • Documentation & Guides – Everything to get started fast
    • Youtube – 100 practical videos from setup to live site demos
    • Forums – Direct support from our team
    • Blog
  • Pricing
  • My licenses
  • Meet
  • 📞  Call
    • 📞  US : (951) 612-8259
    • 📞  France : 01 62 04 55 85
  • Brands & Agencies 💛
  • Products
    • Parsing & Chunking
    • Search
      • Algolia  Search
      • Apache Solr  Search
      • Elasticsearch  Search
      • Google AI Commerce  Search
      • OpenSearch  Search
      • OpenSolr  Search
    • AI Search
      • OpenSearch  AI Search
      • PostgreSQL  AI Search
      • Vespa  AI Search
      • Weaviate  AI Search
    • AI Recommendations
      • Amazon Personalize  AI Recommendations
      • Recombee  AI Recommendations
    • AI Personalized Search & Recommendations
      • Algolia  AI Personalized Search & Recommendations
      • Google AI Commerce  AI Personalized Search & Recommendations
  • Learn
    • Documentation & Guides – Everything to get started fast
    • Youtube – 100 practical videos from setup to live site demos
    • Forums – Direct support from our team
    • Blog
  • Pricing
  • My licenses
  • Meet
  • 📞  Call
    • 📞  US : (951) 612-8259
    • 📞  France : 01 62 04 55 85
  • Brands & Agencies 💛
  • Products
    • Parsing & Chunking
    • Search
      • Algolia  Search
      • Apache Solr  Search
      • Elasticsearch  Search
      • Google AI Commerce  Search
      • OpenSearch  Search
      • OpenSolr  Search
    • AI Search
      • OpenSearch  AI Search
      • PostgreSQL  AI Search
      • Vespa  AI Search
      • Weaviate  AI Search
    • AI Recommendations
      • Amazon Personalize  AI Recommendations
      • Recombee  AI Recommendations
    • AI Personalized Search & Recommendations
      • Algolia  AI Personalized Search & Recommendations
      • Google AI Commerce  AI Personalized Search & Recommendations
  • Learn
    • Documentation & Guides – Everything to get started fast
    • Youtube – 100 practical videos from setup to live site demos
    • Forums – Direct support from our team
    • Blog
  • Pricing
  • My licenses
  • Meet
  • 📞  Call
    • 📞  US : (951) 612-8259
    • 📞  France : 01 62 04 55 85
Expand All Collapse All
  • What is WPSOLR ?
    • The standard WordPress SQL search
    • The WPSOLR search with Elasticsearch, Apache Solr, or Algolia
  • Your configuration journey, step by step
    • Install Apache Solr
    • Hosted Apache Solr and SolrCloud Services
    • Install Weaviate
    • Install Opensearch
    • Install Elasticsearch
    • Elasticsearch Hosting
    • Configure search
      • Getting started with search
      • Getting started with Ajax (live) search
      • Getting started with facets
      • 0. Connect your indexes
        • Create a Google Retail search index
        • Create an Elasticsearch index
          • Generate a test Elasticsearch index
          • Create an Elastic Elasticsearch index
          • Create an Elasticsearch index
          • Create a Qbox Elasticsearch index
          • Create an ElasticPress Elasticsearch index
          • Create an Aiven Elasticsearch or OpenSearch index
          • Create a Bonsai Elasticsearch index
          • Create an Amazon AWS Elasticsearch index
          • Create an ObjectRocket Elasticsearch index
          • Create a Cloudways Elasticsearch or Opensearch index
          • Create an Alibaba Cloud Elasticsearch index
          • Create a Compose Elasticsearch index
          • Connect to an Elasticsearch index
        • Create an Apache Solr index
          • Generate a test Apache Solr index
          • Create an Apache Solr index
          • Create a SearchStax SolrCloud index
          • Create an Opensolr Solr index
          • Connect to an Apache Solr index
        • Create an Opensearch index
          • Create a WPSOLR Hosting OpenSearch index
          • Create an Amazon AWS OpenSearch index
        • Create a Weaviate index
          • Weaviate with Google PaLM API
          • Weaviate with GPT4All
          • Weaviate with sentence transformers
          • Weaviate with CLIP text-to-image
          • Weaviate with HuggingFace Endpoints API
          • Weaviate with OpenAI GPT API
          • Weaviate with Cohere Multilingual API
          • Weaviate with Question Answering transformers
          • Weaviate with Hybrid search
          • Weaviate with Reranker - Cohere
          • Weaviate with Reranker - Transformers (cross-encoders)
        • Create an Algolia index
      • 1. Activate extensions (Add-ons)
        • bbPress add-on
        • YITH WooCommerce Ajax Search add-on
        • SEO add-ons
          • Yoast SEO add-on
          • All in One SEO add-on
        • Listable add-on
        • ACF add-on
        • Advanced Scoring add-on
        • Cron Scheduling add-on
        • Theme add-on
          • Filters layouts
            • Radiobox & Checkbox Layout
            • Numeric Range Layout
            • Colour Picker Layout
            • Date Picker (Flatpickr) Layout
            • Range Slider Layout
          • Add Ajax to the current Theme
          • Collapse taxonomy hierarchies
          • Custom Facets CSS
        • WPML add-on
        • Premium add-on
          • Manage more than one Elasticsearch or Solr index
        • PDF Embedder add-on
        • Geolocation add-on
        • AI Natural Language APIs add-on
          • Amazon Comprehend
          • Google Natural Language
          • Aylien Text Analysis
          • MeaningCloud
          • Qwam Text Analytics
        • Toolset Types add-on
        • AI Image and OCR APIs add-on
          • Google Vision
          • Amazon Rekognition
        • Embed Any Document add-on
        • MyListing add-on
        • Polylang add-on
        • WooCommerce add-on
        • Cross-domain federated search add-on
        • Directory+ add-on
        • Toolset Views add-on
        • Listify add-on
        • Jobify add-on
        • Query Monitor add-on
      • 2. Define your search
        • 2.3 Boosts
        • 2.3 Suggestions (Ajax search)
        • 2.1 Search
        • 2.2 Data
      • 3. Index your data
    • Configure recommendations
      • Algolia - Recommend and Personalized search
      • Recombee - Recommendations
      • Google Retail - AI Recommendations and Personalized search
      • Amazon Personalize
    • Configure WPSOLR Parsing and Chunking
    • Create your Custom Templates for Citations, Suggestions, Related Posts & Recommendations
  • Quick start

Install Elasticsearch

6907 views 3 March 9, 2017 Updated on April 15, 2024

Elasticsearch logo

Videos tutorials

Video – Install Elasticsearch on Ubuntu

Video – Install Elasticsearch on CentOS

Video – Install Elasticsearch on Windows

 

Requirements

WPSOLR was Last tested with  Elasticsearch 6.2.2.

Elasticsearch 5.2
is the first version introduced and tested in WPSOLR. Elasticsearch 2.x will not work, due to change of type mappings.

You will also need the ingest attachments plugin if you need to search files.

 

Table of Contents

Toggle
  • Learn how to install and configure Elasticsearch in a docker container
    • Configure and install Elasticsearch
    • Disable SSL (https)
  • Add Elasticsearch to your WordPress
    • Setup your WordPress website
    • Setup WPSolr WordPress plugin

Learn how to install and configure Elasticsearch in a docker container

 

Configure and install Elasticsearch

Elasticsearch is a search and analytics platform designed for scalability and speed. Elasticsearch offers powerful search and analytical capabilities, making it suitable for a wide range of use cases, from text-based search engines to log and event data analysis.

We are going to use docker containers to host the different applications. To install the docker engine, use the following link : https://docs.docker.com/engine/install/.

Also, don’t forget to install docker-compose.

The Elasticsearch official documentation can be found here : https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html.

Elasticsearch uses a great amount of memory maps, so you have to add this line to /etc/sysctl.conf :

vm.max_map_count = 262144

This will increase the amount of virtual memory maps of your host machine the docker container can use.

You can create the “docker-compose.yml” file :

version: '3.9'

services:
  elasticsearch: 
    image: elasticsearch:8.11.3
    volumes:
      - elasticsearch-config:/usr/share/elasticsearch/config/
    ports:
      - 9200:9200
    networks:
      - my-elasticsearch-network

networks:
  my-elasticsearch-network:

volumes:
  elasticsearch-config:

This will download the official Elasticsearch image and start a container from this image with :

  • port bindings : the 9200 port of the container (the port used by the Elasticsearch service) will be binded to the 9200 port of your host machine. This means that you can communicate with the docker container through the 9200 port of your host machine.
  • volume : this will set the Elasticsearch config directory in your container as a volume called “elasticsearch-config” present in your host machine’s file system. This way you can modify the configuration files outside of your container CLI.
  • networks : this is so that if you have other docker containers, they can communicate with eachother if they are in the same network (in this case “my-elasticsearch-network”).

You can start the service using the following command on your host machine :

docker-compose up -d

Disable SSL (https)

To disable SSL (or https), you can modify the “/usr/share/elasticsearch/config/elasticsearch.yml” in the docker container :

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically      
# generated to configure Elasticsearch security features on 11-04-2024 13:10:17
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: false #previously true

xpack.security.enrollment.enabled: false #previously true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false #previously true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: false #previously true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["a9dce418c848"]

After restarting the service, you can verify that the modifications were applied using :

curl "https://localhost:9200/"

Add Elasticsearch to your WordPress

You can easily add Elasticsearch to your WordPress with no extra cost by using the WPSolr Free plugin. It can add standard search, Ajax search and facets to your WordPress.

Setup your WordPress website

You can create your WordPress container by adding the following to your “docker-compose.yml” :

version: '3.9'

services:
  wp:
    image: wordpress:php8.2-apache
    volumes:
      - wp-data:/var/www/html
    ports:
      - 80:80
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
    networks:
      - backend-wpd
      - frontend-wpd
  db:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: somewordpress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
    networks:
      - backend-wpd
  elasticsearch: 
    image: elasticsearch:8.11.3
    volumes:
      - elasticsearch-config:/usr/share/elasticsearch/config/
    ports:
      - 9200:9200
    networks:
      - frontend-wpd

networks:
  frontend-wpd:
  backend-wpd:

volumes:
  wp-data:

Once you have setup your WordPress container, you can setup WPSolr. WPSolr is a search plugin that can integrate many search engines (including Elasticsearch) into any WordPress website.

 

Setup WPSolr WordPress plugin

 

This guide details how to setup WPSolr to integrate Elasticsearch into your WordPress.

Was this helpful?

3 Yes  8 No
Related Articles
  • Configure WPSOLR Parsing and Chunking
  • Create a WPSOLR Hosting OpenSearch index
  • Create your Custom Templates for Citations, Suggestions, Related Posts & Recommendations
  • Getting started with facets
  • Getting started with Ajax (live) search
  • Getting started with search

Didn't find your answer? Contact Us

Previously
Install Opensearch
Up Next
Elasticsearch Hosting

Built for brands and agencies worldwide

Adobe
Software Development
10K+ employees
Harvard University
Higher Education
798K alumni
University of Essex
Higher Education
101K alumni
Tally
Software development
501-1K employees
WebFX
Advertising Services
501-1K employees
DEFINITION 6
Advertising Services
1K-5K employees
Proto Thema
Newspaper Publishing
51-200 employees
The Fold London
Retail Apparel and Fashion
11-50 employees
Georgia-Pacific LLC
Paper and Forest Product Manufacturing
10K+ employees
Agencies, Software, Universities, Media, Newspapers, Publishers, Retails, Manufacturing, E-Commerce. And many more »

Recommended content

Powered by WPSOLR Enterprise with Recombee

Understand Where Your Store Is Losing Sales
Join our Affiliate Program!
Features
Search Hosting for WordPress
File Parsing and Chunking
Integration Hub
Search
Facets (Filters)
Search Add-ons
Recommendations
Keyword search engines
Comparison grid
Apache Solr & Solr Cloud
Elasticsearch
OpenSearch
Algolia
AI search engines
Comparison grid
PostgreSQL pgvector
Weaviate
Google Retail
Vespa.ai
OpenSearch vector
AI recommendation engines
Comparison grid
Recombee
Amazon Personalize
AI personalization engines
Comparison grid
Google Retail
Algolia
Buy and Learn
Pricing
Privacy policy
Terms and Conditions
© 2026 Eostis SARL. All Rights Reserved.
More
My licenses
Support
Documentation
Blog
Recommendations powered for you by WPSolr
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}