Configure Solr Server for Search API in Drupal 8 or 9

Sabri Tuzcu - Drink some coffee


  • A Solr server running either on your local environment or on another server

Create a new Solr server

  1. Open your browser and login to your Drupal site
  2. Go to Configuration -> Search and metadata -> Search API
  3. Click the Add server button
  4. In the Add search server page, enter the following information
    • Server name: Solr
    • Backend: Solr
    • Solr Connector: Standard
    • Solr host:
    • Solr core: [core-name]
  5. Click the Save button
  6. Click Get button
  7. Download and extract the file, note the location

Create Solr core

  1. Open terminal and copy extracted files to solr lib directory
    $ rsync -aP ~/path-to-solr-config/ [user]@[server]:/usr/local/var/lib/[core-name]
  2. Login to your server and create new index with name in Drupal Search API
    $ solr create_core -c [core-name] -d /usr/local/var/lib/[core-name] -n [core-name]

After creating the Solr core, refresh the newly created Solr server page and you should now be able to see the message "The Solr server could be reached." for your server connection.

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.