Skip to content

Instantly share code, notes, and snippets.

@Sanabria
Forked from lumpysimon/.gitignore
Created June 14, 2021 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sanabria/ef2c92d281291f09ce40018cc6a927be to your computer and use it in GitHub Desktop.
Save Sanabria/ef2c92d281291f09ce40018cc6a927be to your computer and use it in GitHub Desktop.
A .gitignore file for WordPress that ignores pretty much everything except for the specified plugin(s), theme(s) and mu-plugins folder
# .gitignore file for WordPress that ignores everything except:
#
# - .gitignore
# - favicon.ico
# - wp-config.php
# - everything in mu-plugins
# - my-plugin
# - my-theme (except for .sass-cache)
#
# based on https://gist.github.com/jdbartlett/444295
/*
!.gitignore
!favicon.ico
!wp-config.php
!wp-content
wp-content/*
!wp-content/mu-plugins
!wp-content/plugins
!wp-content/themes
wp-content/plugins/*
!wp-content/plugins/my-plugin
wp-content/themes/*
!wp-content/themes/my-theme
.sass-cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment