Matching live environment with Vagrant/Virtualbox

Austinā€™s written a good post on why this happens: Build Steps and Deployment

Thereā€™s also a file in Trellis for defining hooks that run before the project is built during deployment: https://github.com/roots/trellis/blob/master/deploy-hooks/build-before.yml which can run Gulp and rsync the /dist folder over on a deploy for you.

Or you can stick with cPanel :wink:

Cheers will check it outā€¦ I was mainly using this as a bit of a workaround for when youā€™re stuck in cPanel. Itā€™s not always a choice! Provided youā€™re happy with a git history that looks a bit like this:

(ā€˜masterā€™ branch here is my development copy, and I was using ā€˜gulp --productionā€™ to compile stuff for my staging branch so I could do some google pagespeed insights testing)

Itā€™s not that big a deal. I wasnā€™t too happy with the idea of deploying so smoothly with git and then having to resort to old fashioned FTP for the compiled /dist assets.

Hooks is clearly the right way to do this, but, having separate (non-dev) branches where /dist is just included in the repo seemed like a nice happy medium.

FTP makes me feel dirty, I went through a phase of trying to eradicate FTP from my workflow but itā€™s just one of those things you end up having to keep around and fall back on every now and then I find. Clients in the real world at my level seem to be pretty stubbornly attached to cPanel/Plesk etc. and these things donā€™t play nice with Trellis.

Thank you for the great response guys. I can tell this is a great community to be a part of. Iā€™m going to just try syncing my dbs through the wp migrate pro plugin and will let you all know how it goes.