Skip to content

Instantly share code, notes, and snippets.

@mishterk
Last active Jan 20, 2022
Embed
What would you like to do?
This is a boilerplate for a .gitignore file when tracking at the WordPress wp-content directory level. It allows tracking of custom plugins and themes whilst ignoring everything else.
.DS_Store
.sass-cache
node_modules
/upgrade
/cache
/uploads
/advanced-cache.php
/debug.log
/languages
/db.php
/wflogs
# Ignore anything within themes, except the theme we are building.
/themes/*
!/myproject-theme
# Ignore anything within plugins. Exceptions to this to follow.
/plugins/*
# Track any plugins prefixed with myproject-
!/plugins/myproject-*
# Track any other plugins we control
!/plugins/some-custom-plugin
!/plugins/some-modified-third-party-plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment