2

I'm wondering if sites.php is a file that should be tracked? I can see it being useful because domains tend not to change for any given site (not true for development, as I usually run a shortname.local site alias for ease). But then again, if you're not tracking the actual site folder, then the site folder name could vary from installation to installation potentially, making tracking sites.php potentially a useless cause...

I don't know, I guess I'm looking for guidance here. Typically I do not track the sites folder because it contains generated site files and sensitive database information, so maybe it doesn't make sense to track sites.php?

Looking for some tips from the seasoned pros out there.

5

We track it. You can have more than one entry in sites.php that points to the same site, so we have one for the production site and then a few more for development purposes.

The file is not sensitive itself, because if you give someone the ability to read the contents of .php files on your webserver, then you have bigger problems! I'd say try and find reasons NOT to keep it under version control.

I have to say Gisle's suggestion of manually logging changes to files seems to be a bit more effort than I'd normally want to put in, to get round a problem that's not really a problem for me to begin with!

2

I do not track the sites folder with version control (more or less for the same reasons you give). However, I have a manually kept log where I keep track of any permanent configuration changes I do to the site, including the sites folder and sites.php. It is not much extra work to keep such a log, and I've found this log more useful than version control because it only contains essential information while when I relied on an automatically generated log, it exposed a lot of short-lived tests and experiments that I no longer care about.

So I do not see a compelling reason to track sites.php with version control. What I do track (with git) below the sites folder is of course the custom themes/subthemes and custom modules that I maintain myself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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