Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing a website. I have two environments: DEV and REAL. Each of them have a config.php to store database configuration and something.

When I modify something in DEV's config.php and upload to REAL for production, I don't want to modify user and password in REAL's config.php.

For example:

DEV's config.php
user: abc
password: abc
// something below for development

REAL's config.php
user: xyz
password: xyz
// something below for production

If I modify "something below" in DEV's config.php and upload to REAL, I don't want to modify user and password from "abc" to "xyz". Any solutions?

share|improve this question

Include another file with the relevant parts that you don't upload.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.