bedrock-deploy-to-wpengine
bedrock-deploy-to-wpengine copied to clipboard
Deploy bedrock site that is also using trellis
The git repo for my project has this file structure:
.git
trellis
site
I placed the bash script inside site
and setup the remotes for wpengine. However when I run the script, it pushes the trellis
and site
folders up to wpe. site/wp-content
exists (as expected).
When I view wpe via sftp, I see the following folders at docroot:
site
trellis
wp-admin
wp-content
wp-includes
... other wp core files ...
This is likely because my development git repo isn't the bedrock repo, rather bedrock is within the site
folder. Is it possible to deploy based on the relative path of the deploy script?
I am having this same issue as well.
I'm trying to figure out how to edit the bash script or change my project file structure to have the files deployed into the correct location on WPEngine.
@mdkaufman I can't post the commit because it's in a private repo, but I did this:
I also have this, which I'm not sure is necessary (it has a hardcoded theme name in there...)
Then I call the script like this: bash wpe-deploy.sh staging site
where "site" is the folder where my install is. the wpe-deploy script is in the same directory as trellis and site .
Hope that helps!
@mdkaufman that's basically what I was about to try, but I don't have a good way to test it. I'll get one setup w/ Trellis, but in the mean time, does the change you made to line 90 allow you to push up, or no?
@mdkaufman yes I've been using this to deploy to wp engine for the last 5 months on a production site.
@mdkaufman also make sure you run gulp --production
in your theme folder before you deploy.
Thanks @jamiechong and @hello-jason I was able to get it working using the updated script above.
@jamiechong your images no longer work. Can you share the code you added to line 90?
@ljsherlock Ignore the previous comment that I deleted if you happened to see it via email. See this instead: https://gist.github.com/jamiechong/86bc355ffa66e2fd5975d185b5e9f39a
Edit: Also note that the reference to Line 90 in previous comments is actually Line 98 in the gist.
Thanks @jamiechong. Really appreciate that.