Deploying to WP Engine Staging when not using Bedrock or Trellis

Hi,

I am using Sage to build the theme for a website I am developing. I have had no issues getting sage to work and the theme is coming together nicely.

I opted to not use Bedrock or Trellis as I don’t feel I’m ready for making my WordPress sites in that way just yet. Seems there’s a steep learning curve to get them going properly using virtual machines, ansible or capistrano etc.

I need to deploy my site to my WP Engine staging area and I am stuck as I have a Git repo inside another and the theme is not being uploaded. I’ve been trying to use Git Push to accomplish this. I can’t figure out how to merge the 2 repos. I feel very dense here, but the discussions I’ve been reading have been focussed around people using Bedrock.

Since I have not used Bedrock for my theme the advice doesn’t seem to be applicable to me and there wasn’t much in Ben’s book about how to deploy the theme.

I do want to move towards developing the sites in a better way as you often describe but I feel a bit stuck here and don’t know how best to progress without completely restarting my development setup.

Could someone please give me some advice / links to screencasts (anything really) that’ll help me get my theme on my production server.

Any help would be really appreciated.

Rich

1 Like

Try to remove the .git folder inside the theme (sage) folder. That should make it commitable. You can’t use 2 git projects inside each other.

Also inside the theme i usually comment out the # dist folder. And do the gulp --production before the git commit. I know it’s not the perfect way but it works for such deployments through git where there are some limitations. :smile:

On a workflow note for fresh sites, if WP Engine has same git deployments like Cloudways i usually deploy their wordpress app through their system because it comes with a lot of preset settings etc.

Then check what plugins they have and add them to my git repo, add wp-migrate pro and my own.

Push everything to the server, then use wp-migrate pro to pull the database and the server settings (users,passwords etc.) they have to my local. That way i have a almost identical setup on my local to the live server and i don’t overwrite the original settings they have (example w3 total cache etc).

Next step you can use a Coming soon plugin to hide the main site until it’s ready to go live.