Installation of Solr 6 in Drupal 8 using Drupal VM

Posted by Edys Meza on September 5, 2016

Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites.

             How it is described in it's own website

In this post we're going to install Solr 6.1.0  in Drupal 8.1.x using Drupal VM, a Virtual Machine for local Drupal development, built with Vagrant + Ansible.

We will use Solr 6 to make use of the  Major Changes from Solr 5.

Required Modules of Drupal:

We will use the Quick Start Guide of Drupal VM to do the basic installation of Drupal 8 with Solr.

The vagrant box that we will be using is: geerlingguy/ubuntu1604.

Lets be sure to uncomment the option of solr of the installed_extras section ofconfig.yml of Drupal VM. Then we configure the version of solr that we're going to install. For the purposes of this post we will install version 6.1.0:

solr_version: "6.1.0"

To automate further the installation, Drupal VM provides us a script to configure solr such that it can communicate with the Search API Solr module. We'll use this script, indicating it in the config.yml adding it as a Post Provision Script:


 - "{{ config_dir }}/examples/scripts/"

In the script we change the variable SOLR_VERSION to the version 6.x of solr.

And all is ready. We just need to vagrant up   to start our VM.When it's initialized, we can access solr by going to

Do want to keep your Drupal site running smoothly without worrying about maintenance? We can give your site a tune-up or help you keep it up-to-date for the long-term.

Write us about your project, and we’ll get back to you within 48 hours.