i put this in uncategorized as it didn’t fit anywhere else. Is there some document anywhere that describes the intended workflow of combining several git repositories and how to sync your project within the different stages (dev, staging, production). I’ve seen the example project repo but i’m still not sure for example how to sync the database and uploaded files as they’re by default not going into the repo which is fine basically but for local development it would mostly be better to have live content.
It would be great if you could give me some hints or point me to additional documentation that i may have overlooked.
This has been discussed a few times on the forum now. Different things work for different people:
There is doing it manually, probably with wp-cli, zip up the database dump and the uploads folder, and rsync/sftp the files over to the server, add them in.
I believe some work has been made to handle this automatically by some people like @cfx and @fullyint, but they may have run into some issues since you don’t always want to push up the database, or trying to cover pulling the database down to dev, or copying it from staging to production, etc.
For the non-neckbeards, there is a lot of praise for WP Migrate DB Pro which is paid, but makes it super easy to handle the database and sync uploads after a deploy, even from the terminal.
I will look into this syncing topic a bit closer later on.
Currently the git structure still confuses me. On the example project the instructions immediately delete the .git directory after cloning trellis, bedrock and sage and i wonder why. Don’t you want to keep things updated? Isn’t deleting the .git directory removing the information about the git origin and how to update things later?
The reasoning for removing the
.git directories from the other projects is that you’ve now got 1 git repo with all of the projects in it together.
ok, that sounds reasonable.
Maybe i just need a little more reading to wrap my head around this whole organization. Just getting into composer with your screencast. I still have to find out how things play together in my project later.
I just wanted to followup on this as i haven’t yet come along with a solution for me. Is it a good idea to have everything (including trellis) in one repo? How would a sleek update process looks like to bring for example trellis or bedrock up to date in this setup?
I’m still trying to wrap my head around everything while beeing only basically experienced with git and with absolutely no experience when it comes to all the other tools in place (bower, gulp, composer etc.)
According to the many questions that i found already here in the forums it looks like i’m not the only one confused about that but searching for some documents on that topic also wasn’t successful for me until now.
Anyway, thanks for helping!
Yeah, Im also having issues trying to get to the bottom of making this the simplest solution for developing wordpress.
I would have thought for someone like me with my wordpress sites sat on wpengine I would NOT want all the core files, trellis or bedrock on git, just the bits im working on such as child themes and plugins. That way git is extremely streamlined for this process and I am only pushing up to wpengine the bits i am changing?
just a thought…