Skip to content

Instantly share code, notes, and snippets.

@vanbernaert
Forked from lumpysimon/.gitignore
Created May 2, 2020 22:18
Show Gist options
  • Save vanbernaert/5bf4f487548a0ee6e285bca720b37e1d to your computer and use it in GitHub Desktop.
Save vanbernaert/5bf4f487548a0ee6e285bca720b37e1d 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