0
git clone git://develop.git.wordpress.org/ develop

After cloning the core development repository with Git, considering the files and folders are under version control, how can the config files be renamed to wp-config.php and wp-tests-config.php?

.git
src/
tests/
tools/
...
wp-config-sample.php
wp-tests-config-sample.php

I'm aware I can do git mv wp-config-sample.php wp-config.php but now my working copy is different from the upstream repository.

Ref: https://make.wordpress.org/core/2014/01/15/git-mirrors-for-wordpress/

  • You can make another file 'local-wp-config.php' that is conditionally loaded from 'wp-config.php' if exists. You can then add that file to .gitignore. Your local config will be localized to your setup and never uploaded and the process can work w/all team members. You'll have to change 'wp-config.php' to support that type of setup but it works well. – jgraup Jan 7 '16 at 15:05
1

Do not rename or modify the sample files unless such modifications are intended for contribution - they are there for reference. The files wp-config.php and wp-tests-config.php are explicitly ignored by .gitignore. Simply create them as new files yourself (or, if you'd like to use the sample files verbatim create symlinks to the sample files) to avoid unnecessary disparity with upstream.

  • Thanks @bosco, that's nicely clarified what should be done. – henrywright Jan 6 '16 at 22:46

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.