1

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.

0

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:

# http://www.stumiller.me/what-should-be-excluded-in-a-wordpress-gitignore-file/
*~
.DS_Store
.svn
.cvs
*.bak
*.swp
Thumbs.db
wp-config.php
wp-content/uploads/
wp-content/blogs.dir/
wp-content/upgrade/
wp-content/backup-db/
wp-content/advanced-cache.php
wp-content/wp-cache-config.php
wp-content/cache/*
wp-content/cache/supercache/*
*.log
wp-content/cache/
wp-content/backups/
sitemap.xml
sitemap.xml.gz

# http://roybarber.com/version-controlling-wordpress/
wp-content/themes/*/.sass-cache/*
wp-config-local.php
readme.html
license.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.