-
-
Save kanlukasz/b5c32b7def5beba743394ee5ee681792 to your computer and use it in GitHub Desktop.
WordPress - GitHub Repo .gitignore example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------- | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. | |
# | |
# To ignore uncommitted changes in a file that is already tracked, use | |
# git update-index --assume-unchanged | |
# | |
# To stop tracking a file that is currently tracked, use | |
# git rm --cached | |
# | |
# ----------------------------------------------------------------- | |
# ignore everything in the "wp-content" directory, except: | |
# mu-plugins, plugins, and themes directories | |
/* | |
!mu-plugins/ | |
!plugins/ | |
!themes/ | |
# ignore all mu-plugins, plugins, and themes | |
# unless explicitly whitelisted at the end of this file | |
mu-plugins/* | |
plugins/* | |
themes/* | |
# ignore OS generated files | |
# OS generated files # | |
###################### | |
*/.DS_Store | |
.DS_Store | |
.DS_Store? | |
._* | |
.Spotlight-V100 | |
.Trashes | |
Icon? | |
ehthumbs.db | |
Thumbs.db | |
*~ | |
.svn | |
.cvs | |
*.bak | |
*.swp | |
.sass-cache | |
debug.log | |
.idea | |
node_modules | |
.htaccess | |
.env | |
.env.php | |
# ignore log files and databases | |
*.log | |
*.sql | |
*.sqlite | |
# ignore packaged files | |
*.7z | |
*.dmg | |
*.gz | |
*.iso | |
*.jar | |
*.rar | |
*.swp | |
*.swo | |
*.tar | |
*.zip | |
# Ignore Composer Vendor files | |
mu-plugins/app/vendor/* | |
# Wordpress Specific | |
uploads/ | |
blogs.dir/ | |
upgrade/* | |
backup-db/* | |
wp-cache-config.php | |
wp-config.php | |
wp-config-sample.php | |
wpvividbackups/* | |
cache/* | |
cache/supercache/* | |
cache/all/* | |
uploads/backupbuddy_backups/* | |
db.php | |
# Ignore advanced-cache and object-cache for now | |
advanced-cache.php | |
object-cache.php | |
# Ignore mu-plugins, themes and plugins by default | |
mu-plugins/* | |
themes/* | |
plugins/* | |
!mu-plugins/index.php | |
# !themes/index.php | |
# !plugins/index.php | |
# ---------------------------- | |
# Custom Plugin / Theme Files | |
# ---------------------------- | |
# WordPress SEO Ignores | |
/plugins/wordpress-seo-premium/vendor/yoast/api-libs/google/cache/ | |
# Beaver Builder Ignores | |
/uploads/bb-plugin/cache/ | |
# WP Rocket Ignores | |
/advanced-cache.php | |
# Autooptimize | |
/cache/autoptimize/ | |
# ------------------------- | |
# BEGIN Whitelisted Files | |
# ------------------------- | |
# track these misc files | |
!/icons/ | |
# track these files, if they exist | |
!/.gitignore | |
!.gitignore | |
!.editorconfig | |
!.babelrc | |
!.eslintrc | |
!README.md | |
!CHANGELOG.md | |
!composer.json | |
!composer.lock | |
!/index.php | |
# track favicon files, if they exist | |
!android-chrome-*.png | |
!apple-touch-icon*.png | |
!browserconfig.xml | |
!favicon*.png | |
!favicon*.ico | |
!manifest.json | |
!mstile-*.png | |
!safari-pinned-tab.svg | |
# track these mu-plugins | |
!mu-plugins/custom-plugin/ | |
!mu-plugins/custom-plugin.php | |
# Allow mu-plugins | |
!mu-plugins/bb-custom-modules/ | |
# track these plugins | |
!plugins/custom-blocks/ | |
!plugins/custom-plugin/ | |
!plugins/advanced-gutenberg/ | |
# track these themes | |
!themes/custom-theme/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment