Pull from WP Engine and commit to Github

I have success pulling my site from WPE using Local, but how do I integrate this into pushing to a repo?
I can git init and create a repo, but how would others clone that repo and contribute to it?

Am I misunderstanding how this should work?

I have the exact same issue. The process is nice and simple for the person who starts a repo, but seems impossible for a second developer using Git and Local together.

Hi Joe, I think we’ve found a model that works, although it’s still in early stages. But wanted to at least share where we’ve taken it:

  1. We create the repo on Github and upload files to it, typically either a theme or plugin folder. Not en entire WP install.
  2. As a developer I use Local to pull down the entire site, including DB.

Now for the connecting part…

  1. Let’s say we’re dealing with a theme folder. As a developer I delete that theme folder in my local site and now I clone the Github repo down into its place. I personally use GitHub’s desktop GUI client to clone the repo which allows me to adjust the theme folder name if the repo name differs from the folder name. And then of course I add my own .gitignore to the folder.

Now I have a site running in Local where changes to the theme folder are tracked with Git and I can commit/push to the repo.

  1. To get it up to our hosting, which is with WPEngine, we use a nifty Github Action which triggers on any push and copies the changed files up to our dev environment.
  2. From there we review and if the changes look good the manager uses Local to Push the files from the Local instance to production.

How does that sound? Happy to discuss. It’s sort of just the best we’ve been able to come up with. Happy to hear other setups…


Thanks for the reply! I think I found my problem, and it was that my repo includes the entire WP install. I’m going to try and restart with just the theme folder now.

I think you can do both, but limiting to a single folder probably makes it easier to manage.