From 58ed77f960dccd1c6c8f05e8689bb51b37a4046e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Thu, 16 May 2024 00:21:22 +0200 Subject: [PATCH] Playground CLI: Don't create /wordpress/wp-config.php on boot (#1407) Prevents creating a `wp-config.php` file in WordPress document root. Instead, creates it one level higher as WordPress falls back to loading it from there. Related to https://github.com/WordPress/wordpress-playground/issues/1398. Similar to https://github.com/WordPress/wordpress-playground/pull/1382 and https://github.com/WordPress/wordpress-playground/pull/1401. ## Testing instructions Run `bun packages/playground/cli/src/cli.ts server --login` and confirm it loads an installed WordPress. --- packages/playground/cli/src/setup-wp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playground/cli/src/setup-wp.ts b/packages/playground/cli/src/setup-wp.ts index 080305d59b..8570c460dc 100644 --- a/packages/playground/cli/src/setup-wp.ts +++ b/packages/playground/cli/src/setup-wp.ts @@ -122,7 +122,7 @@ async function prepareWordPress(php: NodePHP, wpZip: File) { php.mv(wpPath, '/wordpress'); php.writeFile( - '/wordpress/wp-config.php', + '/wp-config.php', php.readFileAsText('/wordpress/wp-config-sample.php') ); }