Starter theme error on virtual machine "Undefined index: host ..."


I am testing the Bedrock stack + starter theme.

  1. I configured vagrant/ansible
  2. I cloned the starter theme in -->
  3. I ran npm install
  4. Vagrant up

However when I log in backend area I get these errors:

Notice: Undefined index: host in /srv/www/ on line 186

Notice: Undefined index: host in /srv/www/ on line 1871

Notice: Undefined index: host in /srv/www/ on line 1927

When I try to activate the theme, the theme does not display correctly.

Could someone give me a hint how to solve this problem?

thanks very much in advance,


How have you configured the env file?

Thanks very much for your reply.

I am a bit confused, In the roots/bedrock readme I read that using Ansible I no longer need to manually create/edit a .env file

My local .env file is pointing to the corresponding folder on the VM:
.env -> /srv/www/

How should I proceed?
Should I edit the .env file on the server?

thanks again


In that case the env file will take the settings from group_vars/all.

Either way I’m guessing that this is caused by an error in setting the host config (WP_HOME, WP_SITEURL).

Is there a reason why you have your local folder as instead of I’m not sure if that will play nice.

Sorry, I was doing other tests and by mistake I pasted the .env link of another host (ingrasciotta instead of the

Now I solved the problem. I noticed that I got the error because I used “composer create-project roots/bedrock” instead of simply cloning the bedrock repo.

In the bedrock readme file It is written that there is just no need to use composer create (since using Vagrant/Ansible).

If possibile it could be useful to point out that using “composer create …” instead of cloning the bedrock repo can cause errors when using Vagrant/Ansible.

thanks again for help and quick reply!