Skip to content

Instantly share code, notes, and snippets.

@enishant
Created January 17, 2024 13:49
Show Gist options
  • Save enishant/710acbd2425f2efa5b882092bbf1f863 to your computer and use it in GitHub Desktop.
Save enishant/710acbd2425f2efa5b882092bbf1f863 to your computer and use it in GitHub Desktop.
.gitignore for WordPress
# Ignore Mac DS_Store files
.DS_Store
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
# ignore everything in the "wp-content" directory, except:
# plugins, and themes directories
wp-content/*
!wp-content/themes/
!wp-content/plugins/
# ignore all plugins, and themes
wp-content/plugins/index.php
wp-content/themes/*
!wp-content/themes/theme_path/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment