Skip to content

Instantly share code, notes, and snippets.

@hectorlorenzo
Last active August 29, 2015 14:13
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 hectorlorenzo/14f8d2e9cae9076824fe to your computer and use it in GitHub Desktop.
Save hectorlorenzo/14f8d2e9cae9076824fe to your computer and use it in GitHub Desktop.
.gitignore file for fresh Wordpress installations
# ------------------------------------------
# GITIGNORE FOR WORDPRESS
# Really simple .gitignore for new Wordpress intallations.
# User created plugins or themes have to be manually included in it.
# ------------------------------------------
# Ignore everything except the wp-content folder (because it contains the themes
# and plugins), and the gitignore file itself
/*
!.gitignore
!wp-content/
# From the wp-content folder, ignore everything except the plugins and themes folders
wp-content/*
!wp-content/themes/
!wp-content/plugins/
# Exclude all the plugins except the ones listed
wp-content/plugins/*
!wp-content/plugins/my-plugin/
!wp-content/plugins/my-second-plugin/
# Exclude all the themes except the ones listed
wp-content/themes/*
!wp-content/themes/my-theme/
# It is extremely important to exclude all the node-modules folders and bower-components.
node_modules/
bower_components/
.sass-cache/
.sass-cache/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment