Skip to content

Instantly share code, notes, and snippets.

@benhuson
Created April 6, 2016 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benhuson/01d39018c15d213cdf8b11532e2df96d to your computer and use it in GitHub Desktop.
Save benhuson/01d39018c15d213cdf8b11532e2df96d to your computer and use it in GitHub Desktop.
# WordPress Project .gitignore
# Ignore system files
.DS_Store
# Ignore all files by default except `.gitignore` and `site` folder
/*
!/.gitignore
!/site/
# Ignore all subfolders of `site` folder except `wp-content`
/site/*
!/site/wp-content
# Ignore all subfolders of `wp-content` folder except `themes`, `plugins` and `mu-plugins`
/site/wp-content/*
!/site/wp-content/themes
!/site/wp-content/plugins
!/site/wp-content/mu-plugins
# Ignore all theme folders apart for the one being managed
/site/wp-content/themes/*
!/site/wp-content/themes/{my-theme}
# Ignore all CSS files that will be dynamically generated from SASS files
site/wp-content/themes/{my-theme}/css/*
# Ignore all plugins apart from any custom ones
/site/wp-content/plugins/*
!/site/wp-content/plugins/{my-theme-plugin}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment