After Capistrano deployment, WP not seeing anything under "/web/app/" directory (theme, uploads, etc.)


I have combed through the forums and example deploy.rb’s and I am still having a problem I can’t seem to resolve.

I am using Bedrock for a client website project for the first time (LOVE IT btw), along with Capistrano for deployments (with lavmeiker/capistrano-wpcli). The deployment process is a piece of cake except for a couple things that I can’t seem to get fixed.

I’m pretty new to Capistrano so any nudge in the right direction is very much appreciated! I apologize in advance if some of these topics have been covered in other forum posts, but I still can’t seem to resolve my issue.

First - this is deploying to a staging environment where this sites URL is a subdomain on a Go Daddy VPS.

Minor Issue - after each bundle exec cap staging deploy, I get prompted by WP and need to have WP re-generate the WP config and have to fill in the DB Name, DB User, etc.

Is there a way to avoid this after every release with Capistrano? Such as leveraging the “linked files” or “linked directories” functionality?

Main Issue - after deployment and deploying the database using bundle exec cap staging wp-cli:db:push, Wordpress doesn’t see anything under the /web/app/ directory! This includes my custom theme, uploads, etc.

When I log into the WP backend, my custom theme is not listed, nor are any uploads

I have verified all the paths in the config/application.php file are pointing to the correct paths.

When I drag my uploads and theme into /web/wp/wp-content/, everything is seen and works as it should.

If anyone has an ideas as to what I could do to get my Bedrock installation on my staging server to point to my stuff under web/app that would be killer.

If i can post code for certain files let me know what would be helpful.

Thank you in advance.


Are you using

If so, it does contain a default to link .env. If it was missing it would cause the issue you’re seeing (other things could as well). See here:

For the other issue, it could be a domain/path issue? I’m not sure if wp-cli:db:push does any modifications to the DB to update the domain references.

Either way, that WP-CLI package isn’t Roots so we can’t really help too much. Someone else might have experience with it though.