I am testing the Bedrock stack + starter theme.
- I configured vagrant/ansible
- I cloned the starter theme in --> example.dev/web/app/themes/
- I ran npm install
- Vagrant up
However when I log in backend area I get these errors:
Notice: Undefined index: host in /srv/www/example.dev/current/web/wp/wp-includes/class-http.php on line 186
Notice: Undefined index: host in /srv/www/example.dev/current/web/wp/wp-includes/theme.php on line 1871
Notice: Undefined index: host in /srv/www/example.dev/current/web/wp/wp-includes/theme.php 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/ingrasciotta.dev/shared/.env
How should I proceed?
Should I edit the .env file on the server?
In that case the env file will take the settings from
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 example.dev instead of ingrasciotta.dev? 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 example.dev)
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!