Trellis 0.9.8: "Composer and WP-CLI commands need to be run on the virtual machine"

I just updated to Trellis 0.9.8 and upon running the initial vagrant up command, I get this message.

==> default: Machine 'default' has a post `vagrant up` message. This is a message
==> default: from the creator of the Vagrantfile, and not from Vagrant itself:
==> default: 
==> default: Your Trellis Vagrant box is ready to use!
==> default: * Composer and WP-CLI commands need to be run on the virtual machine.
==> default: * You can SSH into the machine with `vagrant ssh`.
==> default: * Then navigate to your WordPress sites at `/srv/www`.
_________________________________________________________________________

When I launch the website locally, I can see that my Sage theme has not been compiled (npm install, bower install, gulp build, etc). In previous versions this would happen automatically. Is this a recent change in the new version? How can I get everything to build with deployment as it used to be the case?

Edit: An other strange issue, WP doesn’t take me through the installation process. The database is already created with an admin user for which I don’t know the password.

Edit: Updated the build-before.yml file to reflect the name of my theme directory. Destroyed the Vagrant box and ran vagrant up again. In effect, logs don’t go show deploy : Run npm install, deploy : Run bower install or any of the tasks related to the theme being built.

Trellis does not assume you are using Sage as your theme. There is no automatic theme build turned on by default, but the boilerplate is ready to go: https://github.com/roots/trellis/blob/master/deploy-hooks/build-before.yml#L7-L31

I’m confused if you’re talking about deploying to a server or your local vagrant box. You don’t deploy to your vagrant box, thus you have always needed and will continue to need to run npm install && bower install && gulp when setting up your Sage theme.

As for your site being installed https://github.com/roots/trellis/blob/master/group_vars/development/vault.yml#L8

1 Like