Skip to content

Instantly share code, notes, and snippets.

@themightymo
Forked from jjeaton/.gitignore
Last active January 18, 2023 23:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save themightymo/27f0095b1251219ea286 to your computer and use it in GitHub Desktop.
Save themightymo/27f0095b1251219ea286 to your computer and use it in GitHub Desktop.
WordPress root .gitignore. Ignore everything and then opt-in (exclude from the ignore) for your custom code.
# codekit #
###########
.sass-cache/
.codekit-config.json
.config.codekit
# wpengine #
############
*~
.DS_Store
.svn
.cvs
*.bak
*.swp
Thumbs.db
# wordpress specific
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
# content. Or see git's documentation for more info on .gitignore files:
# http://kernel.org/pub/software/scm/git/docs/gitignore.html
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!README.md
!.scrutinizer.yml
!apigen.neon
!wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins", "mu-plugins",
# and "themes" directories.
wp-content/*
# !wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
# Ignore everything in the "mu-plugins" directory, except the mu-plugins you
# specify (see the commented-out examples for hints on how to do this.)
# !wp-content/mu-plugins/my-plugin.php
wp-content/mu-plugins/*
# Ignore everything in the "plugins" directory, except the plugins you
# specify (see the commented-out examples for hints on how to do this.)
wp-content/plugins/*
# !wp-content/plugins/my-plugin/*
# Ignore everything in the "themes" directory, except the themes you
# specify (see the commented-out example for a hint on how to do this.)
# wp-content/themes/*
# !wp-content/themes/hustle-child/*
# wpengine specific
.smushit-status
.gitattributes
_wpeprivate
wp-content/object-cache.php
wp-content/mu-plugins/mu-plugin.php
wp-content/mu-plugins/slt-force-strong-passwords.php
wp-content/mu-plugins/limit-login-attempts/*
wp-content/mu-plugins/wpengine-common/*
wp-content/mysql.sql
# wp core (as of 3.4.1)
/db-config.php
/index.php
/license.txt
/readme.html
/wp-activate.php
/wp-app.php
/wp-atom.php
/wp-blog-header.php
/wp-comments-post.php
/wp-commentsrss2.php
/wp-config-sample.php
/wp-cron.php
/wp-feed.php
/wp-links-opml.php
/wp-load.php
/wp-login.php
/wp-mail.php
/wp-rdf.php
/wp-rss.php
/wp-rss2.php
/wp-pass.php
/wp-register.php
/wp-settings.php
/wp-signup.php
/wp-trackback.php
/xmlrpc.php
/wp-admin
/wp-includes
/wp-content/index.php
/wp-content/themes/twentyten
/wp-content/themes/twentyeleven
/wp-content/themes/twentytwelve
/wp-content/themes/twentythirteen
/wp-content/themes/twentyfourteen
/wp-content/themes/twentyfifteen
/wp-content/themes/twentysixteen
/wp-content/themes/index.php
/wp-content/plugins/index.php
*~
.svn
.cvs
.git
.listing
*.bak
*.swp
*.log
plugins/wp-file-cache/cache
cache
_wpeprivate
.cache
temp
tmp
*.tmp
imagecache*
uploads*
*_backup
gt-cache
ics-importer-cache
wp-config-sample.php
wp-content/w3tc*
wp-content/w3-*
wp-content/plugins/wpengine-snapshot/snapshots/*
wp-content/uploads/snapshots
wp-content/themes/thesis*/custom/cache
wp-content/themes/thesis*/lib/scripts/cache
wp-content/themes/*/cache
wp-content/plugins/*/cache
wp-content/w3tc-bak
wp-content/backup*
wp-content/temp*
wp-content/debug.log
wp-content/backups
wp-content/managewp
wp-content/upgrade/*
wp-content/uploads
wp-content/blogs.dir/*/*
pclzip-*
# WordPress debugging files
log.txt
debug.log
# Gallaries in various places
gallery/*
wp-content/gallery/*
wp-content/album/*
# Found in 'sneakernews' - probably just a backup but never going to be good to include
wp-content/plugins/plugins
# Found in the root of pod-1009
.a
# Vagrant
.vagrant
# Forum software we probably shouldn't support anyway
forum/*
# known large file types
*.hqx
*.bin
*.exe
*.dll
*.deb
*.dmg
*.iso
*.img
*.msi
*.msp
*.msm
*.mid
*.midi
*.kar
*.mp3
*.ogg
*.m4a
*.ra
*.3gpp
*.3gp
*.mp4
*.mpeg
*.mpg
*.mov
*.webm
*.flv
*.m4v
*.mng
*.asx
*.asf
*.wmv
*.avi
*.zip
*.tar
*.tgz
*.gz
*.dev.key
*.dev.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment