Skip to content

Instantly share code, notes, and snippets.

@walterebert
Created July 30, 2017 16:08
Show Gist options
  • Save walterebert/9a50f485f3291861a767e88d291bbf17 to your computer and use it in GitHub Desktop.
Save walterebert/9a50f485f3291861a767e88d291bbf17 to your computer and use it in GitHub Desktop.
.gitignore for WordPress projects
.sass-cache/
cache/
node_modules/
/vendor/
wp-config.php
# Exclude WordPress folder (in this example "public")
/public/*
# Re-include specific files + directories
!/public/.htaccess
# WP-CFM
!/public/wp-content/
/public/wp-content/*
!/public/wp-content/config/
# Plugins
!/public/wp-content/plugins/
/public/wp-content/plugins/*
!/public/wp-content/plugins/my-custom-plugin/
# Themes
!/public/wp-content/themes/
/public/wp-content/themes/*
!/public/wp-content/themes/my-custom-theme/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment