How to rename the wp-config.php file once under version control?

by henrywright   Last Updated December 13, 2017 02:08 AM

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/



Answers 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.

bosco
bosco
January 06, 2016 22:43 PM

Related Questions




Questions about Git and WordPress

Updated May 14, 2017 19:08 PM

New version of WordPress plugin not reflected

Updated April 29, 2018 08:08 AM