Skip to content
framework32 active rulesVerified 2026-09-30

Drupal7 (PHP) .gitignore Template

Standard Drupal7 (PHP) gitignore template from upstream github/gitignore collection. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.

Interactive Stack Generator

Preconfigured with Drupal7 (PHP)
Search for templates
Quick add:
Selected1
Drupal7 (PHP)
Selected Templates (1)
.gitignore
32 rules
### Drupal7 (PHP) ###
# gitignore template for Drupal 7 projects
#
# It is recommended that you use `Drupal.gitignore` as this is the latest version
# Ignore configuration files that may contain sensitive information.
sites/*/*settings*.php
sites/example.sites.php
# Ignore paths that contain generated content.
files/
sites/*/files
sites/*/private
sites/*/translations
# Ignore default text files
robots.txt
/CHANGELOG.txt
/COPYRIGHT.txt
/INSTALL*.txt
/LICENSE.txt
/MAINTAINERS.txt
/UPGRADE.txt
/README.txt
sites/README.txt
sites/all/libraries/README.txt
sites/all/modules/README.txt
sites/all/themes/README.txt
# Ignore everything but the "sites" folder ( for non core developer )
.htaccess
web.config
authorize.php
cron.php
index.php
install.php
update.php
xmlrpc.php
/includes
/misc
/modules
/profiles
/scripts
/themes
45 lines•UTF-8
Deterministic

Raw Drupal7 (PHP) .gitignore

Crawlable upstream source template
php-drupal7.gitignore•44 lines•UTF-8
# gitignore template for Drupal 7 projects
#
# It is recommended that you use `Drupal.gitignore` as this is the latest version
# Ignore configuration files that may contain sensitive information.
sites/*/*settings*.php
sites/example.sites.php
# Ignore paths that contain generated content.
files/
sites/*/files
sites/*/private
sites/*/translations
# Ignore default text files
robots.txt
/CHANGELOG.txt
/COPYRIGHT.txt
/INSTALL*.txt
/LICENSE.txt
/MAINTAINERS.txt
/UPGRADE.txt
/README.txt
sites/README.txt
sites/all/libraries/README.txt
sites/all/modules/README.txt
sites/all/themes/README.txt
# Ignore everything but the "sites" folder ( for non core developer )
.htaccess
web.config
authorize.php
cron.php
index.php
install.php
update.php
xmlrpc.php
/includes
/misc
/modules
/profiles
/scripts
/themes

Key Pattern Breakdown

Environment Secrets & Local Overrides

Local environment configurations, secrets, and credentials intended to protect developer-specific settings from exposure.

authorize.php

Source & Verification

License: CC0-1.0

Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.