Skip to content

chore: ignore server-generated PHP config files - #1764

Open
Satendra-SR wants to merge 1 commit into
devfrom
chore/gitignore-server-generated-php-config
Open

chore: ignore server-generated PHP config files#1764
Satendra-SR wants to merge 1 commit into
devfrom
chore/gitignore-server-generated-php-config

Conversation

@Satendra-SR

Copy link
Copy Markdown
Member

Adds two entries to .gitignore:

/.user.ini
/wordfence-waf.php

Why

Both files are generated on the server, not authored in the repo:

  • .user.ini — PHP-FPM (and CGI) reads a per-directory .user.ini for PHP settings. It is the FPM equivalent of the php_value directives that .htaccess carries under mod_php, and its contents are environment-specific.
  • wordfence-waf.php — Wordfence writes this into the web root when Extended Protection is enabled, and points auto_prepend_file at it.

This is the same category as /.htaccess and wp-config.php, which this file already ignores for exactly the same reason.

Impact

Neither file is tracked today, so nothing about what gets deployed changes. Two things improve:

  1. They stop showing up as untracked in git status on every server that has them.
  2. Neither can be committed by accident, which would push one environment's PHP config to all of them.

Low risk — additive only, no tracked file is affected.

🤖 Generated with Claude Code

PHP-FPM reads a per-directory `.user.ini`, and Wordfence writes
`wordfence-waf.php` into the web root when Extended Protection is on.
Both are generated on the server, differ per environment, and are not
meant to be version-controlled — the same category as `/.htaccess` and
`wp-config.php`, which are already ignored here.

Neither file is tracked today, so nothing about what gets deployed
changes. This stops them appearing as untracked in `git status` on every
server, and removes the chance of one being committed by accident.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a033efd1-9756-41c5-9eac-e354ea16ffc5


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Satendra-SR Satendra-SR self-assigned this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant