-
-
Save cobbman/6075946 to your computer and use it in GitHub Desktop.
gitignore template for wordpress sites. Place it in the root directory or where WordPress is installed. Default tracks wp core files. Has option to ignore everything.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
## ## | |
## GIT IGNORE FOR WORDPRESS SITES ## | |
## ------------------------------ ## | |
## By: BigWilliam <hello@bigwilliam.com> ## | |
## Last Modified: 2016-06-16 ## | |
## ## | |
## License: MIT - aka you can use/modify this how you want :) ## | |
## ## | |
############################################################################### | |
############################################################################### | |
## ## | |
## NOTE: TO STOP TRACKING A FILE AFTER IGNORING IT, ## | |
## USE THESE GIT COMMANDS: ## | |
## ## | |
## git rm -r --cached <file> ## | |
## git add <file> ## | |
## ## | |
## Learn more in your terminal, type: git help gitignore ## | |
## ## | |
############################################################################### | |
##===========================================================================## | |
# Uncomment the rules below as you need them. # | |
# These can be useful if you only want to track your theme # | |
# instead of an entire WordPress install. # | |
##===========================================================================## | |
#/.htaccess | |
# Ignore everything but... | |
# ---------------------------------- | |
#/* | |
#!.gitignore | |
#!/wp-content/ | |
#!/favicon.ico | |
#!/favicon.png | |
#!/robots.txt | |
#!/humans.txt | |
# Ignore WP Core files (keeps wp-content) | |
# ---------------------------------- | |
#/wp-admin | |
#/wp-includes | |
#/index.php | |
#/license.txt | |
#/readme.html | |
#/wp-activate.php | |
#/wp-blog-header.php | |
#/wp-comments-post.php | |
#/wp-cron.php | |
#/wp-links-opml.php | |
#/wp-load.php | |
#/wp-login.php | |
#/wp-mail.php | |
#/wp-settings.php | |
#/wp-signup.php | |
#/wp-trackback.php | |
#/xmlrpc.php | |
# WP Config | |
# ---------------------------------- | |
/wp-config-local.php | |
/wp-config-staging.php | |
#/wp-config.php | |
# wp-content (covers backup/cache stuff) | |
# ------------------------------------- | |
/wp-content/* | |
!/wp-content/plugins/ | |
!/wp-content/mu-plugins/ | |
!/wp-content/themes/ | |
#!/wp-content/uploads | |
# wp-content/plugins | |
# ---------------------------------- | |
# /wp-content/plugins/* | |
# /wp-content/mu-plugins/* | |
# !/wp-content/plugins/my-single-file-plugin.php | |
# !/wp-content/plugins/my-directory-plugin/ | |
/wp-content/plugins/hello.php | |
# wp-content/themes | |
# ---------------------------------- | |
# /wp-content/themes/* | |
# !/wp-content/themes/my-custom-theme/ | |
/wp-content/themes/twenty* | |
# Cache | |
# ---------------------------------- | |
cache | |
/wp-content/object-cache.php # Redis cache | |
/wp-content/advanced-cache.php | |
/wp-content/wp-cache-config.php | |
# Backups | |
# ---------------------------------- | |
backups | |
/wp-content/updraft | |
##========================================================================## | |
# Non-WordPress items worth ignoring (generally don't need to edit these) # | |
##========================================================================## | |
# Log files | |
# ---------------------------------- | |
*.log | |
error_log | |
access_log | |
.sass-cache | |
*.swp | |
# OSX and Windows anoying files | |
# ---------------------------------- | |
.DS_Store | |
.DS_Store? | |
._* | |
.Spotlight-V100 | |
.Trashes | |
ehthumbs.db | |
*[Tt]humbs.db | |
*.Trashes | |
# Server Files | |
# ---------------------------------- | |
/cgi-bin | |
# IDE Folders/Files | |
# ---------------------------------- | |
/.idea # php storm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment