Skip to content

Commit 56582ce

Browse files
committed
Write wp-config.php to repo root from start instead of ABSPATH and then moving up
1 parent 03def53 commit 56582ce

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tools/local-env/scripts/install.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dotenvExpand.expand( dotenv.config() );
1111
local_env_utils.determine_auth_option();
1212

1313
// Create wp-config.php.
14-
wp_cli( 'config create --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --force' );
14+
wp_cli( `config create --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --force --config-file=${process.env.LOCAL_DIR}/../wp-config.php` );
1515

1616
// Add the debug settings to wp-config.php.
1717
// Windows requires this to be done as an additional step, rather than using the --extra-php option in the previous step.
@@ -22,9 +22,6 @@ wp_cli( `config set SCRIPT_DEBUG ${process.env.LOCAL_SCRIPT_DEBUG} --raw --type=
2222
wp_cli( `config set WP_ENVIRONMENT_TYPE ${process.env.LOCAL_WP_ENVIRONMENT_TYPE} --type=constant` );
2323
wp_cli( `config set WP_DEVELOPMENT_MODE ${process.env.LOCAL_WP_DEVELOPMENT_MODE} --type=constant` );
2424

25-
// Move wp-config.php to the base directory, so it doesn't get mixed up in the src or build directories.
26-
renameSync( `${process.env.LOCAL_DIR}/wp-config.php`, 'wp-config.php' );
27-
2825
// Read in wp-tests-config-sample.php, edit it to work with our config, then write it to wp-tests-config.php.
2926
const testConfig = readFileSync( 'wp-tests-config-sample.php', 'utf8' )
3027
.replace( 'youremptytestdbnamehere', 'wordpress_develop_tests' )

0 commit comments

Comments
 (0)