Skip to content

Instantly share code, notes, and snippets.

@haqHUB
Forked from lumpysimon/.gitignore
Created July 5, 2020 11:33
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 haqHUB/ac7a1dc5f4421c9c3c4bb0750be14f5d to your computer and use it in GitHub Desktop.
Save haqHUB/ac7a1dc5f4421c9c3c4bb0750be14f5d 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