Skip to content

Instantly share code, notes, and snippets.

@leogopal
Created January 30, 2018 06:42
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 leogopal/a09c64535ae3bd0705e5a15fdcff6ab1 to your computer and use it in GitHub Desktop.
Save leogopal/a09c64535ae3bd0705e5a15fdcff6ab1 to your computer and use it in GitHub Desktop.
A WordPress specific .gitignore
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
# ignore all files starting with .
.*
# track this file .gitignore (i.e. do NOT ignore it)
!.gitignore
# track .editorconfig file (i.e. do NOT ignore it)
!.editorconfig
# track readme.md in the root (i.e. do NOT ignore it)
!readme.md
# ignore all files that start with ~
~*
# ignore OS generated files
ehthumbs.db
Thumbs.db
# ignore Editor files
*.sublime-project
*.sublime-workspace
*.komodoproject
.idea
# ignore log files and databases
*.log
*.sql
*.sqlite
# ignore compiled files
*.com
*.class
*.dll
*.exe
*.o
*.so
# ignore packaged files
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
.DS_Store
# ignore everything in the "wp-content" directory, except:
# "mu-plugins" directory
# "plugins" directory
# "themes" directory
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
# ignore these plugins from the core
wp-content/plugins/hello.php
wp-content/plugins/akismet/
# ignore specific themes
wp-content/themes/twenty*/
# ignore node/grunt dependency directories
node_modules/
/.htaccess
/license.txt
/readme.html
/sitemap.xml
/sitemap.xml.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment