Skip to content

Instantly share code, notes, and snippets.

@seansean11
Last active May 1, 2017 18:40
Show Gist options
  • Save seansean11/4a2988d43ca58c233d01 to your computer and use it in GitHub Desktop.
Save seansean11/4a2988d43ca58c233d01 to your computer and use it in GitHub Desktop.
.gitignore for WordPress themes
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore those unneeded sass-cache + node_modules files.
.sass-cache
.sass-cache/*
node_modules/
# Ignore everything in the "wp-content" directory, except the "plugins"
# and "themes" directories.
wp-content/*
!wp-content/plugins/
!wp-content/themes/
# Ignore everything in the "plugins" directory, except the plugins you
# specify (see the commented-out examples for hints on how to do this.)
wp-content/plugins/*
# !wp-content/plugins/my-single-file-plugin.php
# !wp-content/plugins/my-directory-plugin/
# Ignore everything in the "themes" directory, except the themes you
# specify (see the commented-out example for a hint on how to do this.)
wp-content/themes/*
# !wp-content/themes/my-theme-folder/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment