Skip to content

Instantly share code, notes, and snippets.

@shrinkray
Last active March 9, 2021 21:22
Show Gist options
  • Save shrinkray/2b98763eb14be7612afdc56fb4e49a12 to your computer and use it in GitHub Desktop.
Save shrinkray/2b98763eb14be7612afdc56fb4e49a12 to your computer and use it in GitHub Desktop.
Ignore all except theme and plugins for public root repos
# .gitignore file for WordPress. Ignores everything except theme and plugins.
# Located in the root folder
# based on https://gist.github.com/jdbartlett/444295
# Broad capture
/*
# Host and php files
*wp-*.php
**_wpeprivate/*
**.wpe*
# Public Root
!.gitignore
**favicon.ico
# Target wp-content
!wp-content
wp-content/*
wp-content/upgrade/*
wp-content/uploads/*
# Plugins
**wp-content/mu-plugins
wp-content/plugins/*
!wp-content/plugins/my-plugin
# Theme
!wp-content/themes
wp-content/themes/*
!wp-content/themes/mowtown-ecommerce
wp-content/themes/mowtown-ecommerce/node_modules/*
wp-content/themes/mowtown-ecommerce/dist/*
wp-content/themes/mowtown-ecommerce/assets/build/*
# Disallow large filetypes
*.hqx
*.bin
*.exe
*.dll
*.deb
*.dmg
*.iso
*.img
*.msi
*.msp
*.msm
*.mid
*.midi
*.kar
*.mp3
*.ogg
*.m4a
*.ra
*.3gpp
*.3gp
*.mp4
*.mpeg
*.mpg
*.mov
*.webm
*.flv
*.m4v
*.mng
*.asx
*.asf
*.wmv
*.avi
@shrinkray
Copy link
Author

add /upgrades and /uploads directories

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment