Skip to content

Instantly share code, notes, and snippets.

@agkovalev
Last active May 17, 2021 15:48
Show Gist options
  • Save agkovalev/892a0116f666f9d475a94f1ef9222c59 to your computer and use it in GitHub Desktop.
Save agkovalev/892a0116f666f9d475a94f1ef9222c59 to your computer and use it in GitHub Desktop.
Gitignore config for Wordpress based Projects
# ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!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/*
# wp-content/plugins/hello.php
# wp-content/plugins/astra-addon/
# wp-content/plugins/wp-scss/
# ignore specific themes
wp-content/themes/twenty*/
# ignore parent theme
wp-content/themes/PARENT_THEME/
# ignore node dependency directories
node_modules/
# ignore log files and databases
*.log
*.sql
*.sqlite
# compiled translations
*.mo
# There are passwords!
wp-config.php
# IDE
*.code-workspace
sftp.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment