Setting Up GIT Deployments from Local by Flywheel to Production Flywheel


#1

Hello All,
I am trying to understand the best way to introduce Local by Flywheel into my companies production kickoff workflow. Here is our current process:

  • Create a GIT repository at Beanstalk that is blank
  • Clone that repo locally so we have a blank folder
  • Install WP core
  • Create GIT .ignore file to remove everything but wp-content/themes and wp-content/plugins
  • Install theme and plugins locally
  • Push changes to origin
  • Deploy changes to staging server

This works just fine currently. My issue right now is that if I clone the repo to Local inside of the default ~/Local Sites folder and then create a new site using Local by Flywheel, it adds a lot of folders. I have created a git ignore file that only allows GIT to track changes to app/public/wp-content/themes and app/public/wp-content/plugins respectively and that works fine. I can commit those changes just fine but it has the app/public/wp-content in the path and when I attempt to deploy to the production site on flywheel using my SFTP credentials, it adds the folder structure app/public/.

There has to be a better way to manage the code base amongst a large team and still allow for deployments to the host without adding app/public/ to the final deployment location.

Does anyone have a suggestion on how to solve this deployment problem??


#2

Are you putting the entire WordPress site into version control?

I used to do that, but ever since I switched to FlyWheel, I create a separate git repo for the theme and plugins