Skip to content

Instantly share code, notes, and snippets.

@fourstacks
Created March 5, 2014 12:20
Show Gist options
  • Save fourstacks/9366170 to your computer and use it in GitHub Desktop.
Save fourstacks/9366170 to your computer and use it in GitHub Desktop.
A .gitignore for wordpress
kudos to - http://bigwilliam.com/gitignore-for-wordpress-projects/
###############################################################################
## #
## GIT IGNORE FOR WORDPRESS SITES #
## ------------------------------ #
## By: BigWilliam <hello@bigwilliam.com> #
## License: MIT - aka you can use/modify this how you want :) #
## #
###############################################################################
###############################################################################
## #
## NOTE: TO STOP TRACKING A FILE AFTER IGNORING IT, #
## USE THESE GIT COMMANDS: #
## #
## git rm --cached <file> #
## git add . # or git add <file> #
## #
###############################################################################
## OS and Utility Stuff ##
#==================#
# OS Files #
#==================#
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
*[Tt]humbs.db
*.Trashes
#==================#
# Log files #
#==================#
*.log
error_log
access_log
.sass-cache
#===================================#
# Config. and npm Files #
#===================================#
local-config.php
# wp-config.php
node_modules
## Main Stuff ##
#===================================#
# WP Core, except content #
#===================================#
/*
!.gitignore
!wp-content/
# !media/
!favicon.ico
!favicon.png
!robots.txt
!humans.txt
#=============================================#
# wp-content, except plugins and themes #
#=============================================#
wp-content/*
!wp-content/plugins/
!wp-content/mu-plugins/
!wp-content/themes/
# !wp-content/uploads ##=> It's a good idea to ignore uploads, especially if you are using git to deploy to live/dev environments. Un-comment this line to 'watch' uploads
## Use these to get more specific ##
#===========================#
# Specific Plugins #
#===========================#
# wp-content/plugins/*
# !wp-content/plugins/my-single-file-plugin.php
# !wp-content/plugins/my-directory-plugin/
#===========================#
# Specific Themes #
#===========================#
# wp-content/themes/*
# !wp-content/themes/my-theme/
## Depreciated stuff, keeping here for reference ##
##### design files #####
# *.psd
##### CACHE #####
# wp-content/cache/
# wp-content/advanced-cache.php
# wp-content/wp-cache-config.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment