Skip to content

Instantly share code, notes, and snippets.

@timstl
Last active September 6, 2018 14:09
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 timstl/285a43a80d03c37d0687419c7a680406 to your computer and use it in GitHub Desktop.
Save timstl/285a43a80d03c37d0687419c7a680406 to your computer and use it in GitHub Desktop.
WordPress .gitignore template; A compilation of many examples customized to fit our needs.
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
# ignore everything in the "wp-content" directory, except:
# plugins and themes directories
wp-content/*
!wp-content/plugins/
!wp-content/themes/
wp-content/themes/twenty*
# ignore all files starting with . or ~
.*
~*
# ignore node dependency directories (used by grunt)
node_modules/
# ignore OS generated files
ehthumbs.db
Thumbs.db
# ignore log files and databases
*.log
*.sql
*.sqlite
# ignore compiled files
*.com
*.class
*.dll
*.exe
*.o
*.so
# ignore packaged files
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# -------------------------
# BEGIN Whitelisted Files
# -------------------------
# track these files, if they exist
!.gitignore
!.editorconfig
!README.md
!CHANGELOG.md
!composer.json
!*.yml
!my_known_hosts
!backgroundsize.min.htc
# track favicon files, if they exist
!android-chrome-*.png
!apple-touch-icon*.png
!browserconfig.xml
!favicon*.png
!favicon*.ico
!manifest.json
!mstile-*.png
!safari-pinned-tab.svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment