What does bedrock-ansible deploy and what doesn't it?

Following the Example Project readme:

  • I successfully got mysite.dev working with vagrant up. Woohoo!
  • I set up my server with playbook-ansible. Woohoo!
  • I did: ./deploy.sh production mysite.com. Got the WP install screen. Is this right?

I assumed it would deploy my working development site to production (database, site files, rewritten with the production URL, etc). If not, what does deploy actually deploy and what doesn’t it that I need to set up separately. I couldn’t find documentation on this.

1 Like

DB syncing (both ways) is something I’m interested in for sure. It would have to be a separate playbook though. You wouldn’t want to db overwritten every time you deploy. Perhaps the first time you deploy and then sporadically after that.

1 Like

The bedrock-ansible deployment is actually very similar to the original Capistrano deployment process. Basically, it’s code that is deployed. Database and user uploads are not touched. Uploads are shared between releases.


It clones your git repo, so whatever is in the site folder is what is being pushed. I use WP Migrate DB Pro to push database changes.

So, install the site, add the plugin to your composer.json, log into your live site, push your database from local to remote, and ta-da - you have a functioning site.

1 Like

Just to confirm: yes you should see the WP Install page by default on your first deploy.

1 Like

Ok, cool that all makes sense to me now. deploy just deploys code. I normally use WP Migrate DB Pro for db + media, so I’ll follow the suggestion to add that to composer.json (that’s pretty cool actually).

Still, that means the Example Project readme is missing the final steps on how to get from the initial deploy to a working WordPress site on Production just like roots-example-project.com or like in the .dev install. I’m happy to write up those instructions on the readme if we can decide on the best way to get a “hello world” default WP site working for the example.


What if you see the install screen after each (2nd, 3rd etc.) deploy? Also i can’t seem to see the plugins from my repo in there, looks just like a clean install.

Should the “repo:” setting be a empty repo used for deployments or the whole project like the roots example one? i think that part is missing from the readme.

Install screen. @darjanpanic Assuming you completed the install steps from the install screen the first time, I can’t think of why you’d get the install screen on subsequent deploys.

Repo. I believe the recommendation will be that repo be for the whole project, a new project you’ve created using the example project’s readme instructions (as you suggested).

However, the flexibility is there for the deploy to pull files from any repo you want, and/or copy up any set of files you want from your local machine (examples). Till the various documentation is fleshed out, you’ll find many of the options in roles/deploy/defaults/main.yml (if you haven’t already). You’ll also see the flexibility to compile assets locally or on the server, etc. (local compilation will probably be the recommendation).

Plugins. As to why you’re not seeing all your plugins, this could happen if you haven’t yet customized
repo: git@github.com:roots/bedrock.git
because that would give you bedrock’s default composer.json file, which wouldn’t have your plugins added (so, the composer install run by the deploy role here wouldn’t know to install your plugins.)

Let us know if you have repo pointed to a repo with your customized composer.json but the plugins still don’t show after running the deploy.


Thanks for the reply! Got some time to play with this again.

For the plugins etc. i added them manually to the /plugins/ folder on my local (pushed everything to git before deploy). The vagrant dev works normally, but the live site (wp admin panel) doesn’t show them (sage theme is also missing). I ssh web@livelisite to check the folders and the plugins are there, they just don’t show in the admin. It’s like having 2 separate wp installs which may be the reason why i have the wp install screen after each deploy.

My git repo structure is

  • ansible/
  • vagrantfile

And i have the subtree set to “site”. Site also has the composer.json default one but it should add the soil plugin at least.

I’ll probably delete the droplet and start a fresh project i may have missed a step although i tried to do it couple of times already :smile: Maybe the new readme etc will help :smiley:

Thanks for the help!