Skip to content

Instantly share code, notes, and snippets.

@n8finch
Last active April 18, 2023 19:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n8finch/0ac0e6599f80f2995c2407d01a2bcd6c to your computer and use it in GitHub Desktop.
Save n8finch/0ac0e6599f80f2995c2407d01a2bcd6c to your computer and use it in GitHub Desktop.
This gitignore will ignore anything that isn't in mu-plugins, plugins, and themes directories of your wp-content directory.
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "mu-plugins", "plugins", and "themes" directories.
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
# Ignore Strattic-specific files.
wp-content/mu-plugins/strattic.php
wp-content/mu-plugins/ludicrousdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment