Currently, I’ve got my local machine setup and pushing to staging via git.
There are cases where I upload images locally to test admin page interaction.
In my .gitignore
file I’m ignoring everything but the theme and plugin folders. I’m curious as to how you handle the initial push to a staging server. Namely the uploads folder. Do you push everything, then modify the .gitignore
file to not show uploads?
Just trying to perfect my process. Any insight would be helpful.
I set up every environment with a fresh WordPress installation. Then I do an initial commit from my local dev and start working there with Gitflow Workflow. Then I deploy the develop branch to the staging environment and the master branch to the live site. I ignore all the uploads in
wp-content/uploads
. Every instance will be packed with different contents, since every environment will mainly be accessed by someone different / for a different purpose / at a different project time. Here’s my.gitignore
: