Skip to content

Instantly share code, notes, and snippets.

@aramboyajyan
Last active March 22, 2024 09:22
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 aramboyajyan/d01de74cf7d3a98c645319cf5e56ad31 to your computer and use it in GitHub Desktop.
Save aramboyajyan/d01de74cf7d3a98c645319cf5e56ad31 to your computer and use it in GitHub Desktop.
.gitignore for WordPress
# Configuration.
/.htaccess
/.htaccess_lscachebak_*
/wp-config.php
/sitemap.xml
/sitemap.xml.gz
# Files in the root.
*.pdf
*.jpg
*.jpeg
*.png
*.txt
*.csv
*.zip
*.xml
*.7z
*.gz
# WP dirs.
wp-admin/*
wp-includes/*
wp-snapshots/*
# Ignore everything in the "wp-content" directory. Exceptions for custom code
# and other required files are below.
/wp-content/cache/*
/wp-content/languages/*
/wp-content/uploads/*
/wp-content/plugins/*
/wp-content/updraft/*
/wp-content/wflogs/*
/wp-content/infinitewp/*
/wp-content/mu-plugins/*
/wp-content/themes/*
# Necessary for Litespeed setups.
!wp-content/advanced-cache.php
!/wp-content/object-cache.php
!wp-content/.object-cache.ini
# Custom plugins.
# !wp-content/plugins/PLUGIN_NAME
# Custom themes.
# !wp-content/themes/THEME_NAME
# Ignore node dependency directories.
**/node_modules/
# Ignore unnecessary files.
**/*.log
**/*.sql
**/*.sqlite
**/*.mp3
**/*.mp4
**/error_log
# PhpStorm files.
/.idea/
# ddev files.
/.ddev/
# DS_Store files.
**/.DS_Store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment