Installeren met Trellis
Elasticsearch install and configure for development
Install Elasticsearch in Trellis
Check version requirement for ElasticPress plugin
Go to Github ElasticPress and check for EP_ES_VERSION_MAX
. At time of writing this is set to 6.2. Make sure you install the latest compatible version of Elasticsearch.
Add requirements to trellis/requirements.yml
Install new requirements in trellis/
folder
Update memory for Vagrant box in trellis/vagrant.default.yml
Note: after this step you need to rebuild your vagrant box for the changes to take effect.
Configure trellis/dev.yml
file with variables and role
Add variables for Elasticsearch just below the βremote_userβ line.
Add Elasticsearch role at the end of the βrolesβ section
In the next steps we will apply the changed configuration to the virtual machine.
Backup your vagrant database from the trellis/
folder
This creates a sql dump file of the current state.
Rebuild Vagrant box from your trellis/
folder
This may take a while depending on the speed of your machine. (~5-10 minutes)
Import your database
After vagrant is rebuild run this from your trellis/
folder.
Where FILENAME is the filename of your db backup.
All done!
Configure ElasticPress to connect to Elasticsearch
Install the ElasticPress plugin from the site/
folder
Activate and configure ElasticPress plugin
- Enter
http://127.0.0.1:9200
as Elasticsearch Host - Sync with ElasticPress plugin