Skip to content

Instantly share code, notes, and snippets.

@ryanscherler
Created February 17, 2014 05:01
Show Gist options
  • Save ryanscherler/9045010 to your computer and use it in GitHub Desktop.
Save ryanscherler/9045010 to your computer and use it in GitHub Desktop.
.gitignore file for git-managed WordPress projects
# This is a .gitignore file for git-managed WordPress projects.
# Ignore everything in the root except the "wordpress" directory.
/*
!.gitignore
!wordpress/
# Ignore everything in the "wordpress" directory except the "wp-content" directory
wordpress/*
!wordpress/wp-content/
# Ignore everything in the "wp-content" directory, except the "themes" and "plugins" directory
wordpress/wp-content/*
!wordpress/wp-content/themes/
# !wordpress/wp-content/plugins/
# Ignore everything in the "themes" directory, except the themes specified
wordpress/wp-content/themes/*
!wordpress/wp-content/themes/my-theme/
# Ignore everything in the "plugins" directory, except the plugins specified
# wordpress/wp-content/plugins/*
#!wordpress/wp-content/plugins/my-plugin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment