Matching live environment with Vagrant/Virtualbox

Austin’s written a good post on why this happens:

There’s also a file in Trellis for defining hooks that run before the project is built during deployment: 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.