Skip to content

Instantly share code, notes, and snippets.

@pmkay
Created December 23, 2020 16:35
Show Gist options
  • Save pmkay/6877073e7697cfe09185ec6aa94b501d to your computer and use it in GitHub Desktop.
Save pmkay/6877073e7697cfe09185ec6aa94b501d to your computer and use it in GitHub Desktop.
Git ignore for WordPress Repositories
# ignore everything in the root except the "wp-content" directory.
!wp-content/
# ignore everything in the "wp-content" directory, except:
# "mu-plugins", "plugins", "themes" directory
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
# ignore these plugins
wp-content/plugins/hello.php
# ignore specific themes
wp-content/themes/twenty*/
# ignore node dependency directories
node_modules/
# ignore log files and databases
*.log
*.sql
*.sqlite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment