Skip to content

Instantly share code, notes, and snippets.

@nielslange
Last active February 20, 2017 07:29
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 nielslange/58ab995a63145f28093622b63e85d318 to your computer and use it in GitHub Desktop.
Save nielslange/58ab995a63145f28093622b63e85d318 to your computer and use it in GitHub Desktop.
WordPress .gitignore
# Ignore everything in the root except the "wp-content" directory, the config
# fies and the meta files.
/*
.*
~*
!wp-content/
!.gitignore
!.htaccess
!.htpasswd
!README.md
!CHANGELOG.md
!robots.txt
!humans.txt
!composer.json
# Ignore everything in the "wp-content" directory, except the "mu-plugins", the
# "plugins" and the "themes" directories
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
# Ignore everything in the "plugins" directory, except specified plugins
wp-content/plugins/*
# !wp-content/plugins/my-single-file-plugin.php
# !wp-content/plugins/my-directory-plugin/
# Ignore everything in the "themes" directory, except specified themes
wp-content/themes/*
!wp-content/themes/theme/
!wp-content/themes/theme-child/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment