From b1611377904d69e42ef8c316069bfab4a8dd7c9f Mon Sep 17 00:00:00 2001 From: Antonio Sejas Date: Thu, 6 Mar 2025 15:39:09 +0000 Subject: [PATCH 1/2] avoid creating hello wp-now virtual index.php --- vendor/wp-now/src/wp-now.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/vendor/wp-now/src/wp-now.ts b/vendor/wp-now/src/wp-now.ts index b3e61cd12..c89a11f78 100644 --- a/vendor/wp-now/src/wp-now.ts +++ b/vendor/wp-now/src/wp-now.ts @@ -166,7 +166,6 @@ async function getPHPInstance( async function prepareDocumentRoot( php: PHP, options: WPNowOptions ) { php.mkdir( options.documentRoot ); php.chdir( options.documentRoot ); - php.writeFile( `${ options.documentRoot }/index.php`, ` Date: Thu, 6 Mar 2025 15:40:07 +0000 Subject: [PATCH 2/2] avoid initializing Playground and mounting direcotries again when PHP runtime rotates --- vendor/wp-now/src/wp-now.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vendor/wp-now/src/wp-now.ts b/vendor/wp-now/src/wp-now.ts index c89a11f78..f09c8b8ac 100644 --- a/vendor/wp-now/src/wp-now.ts +++ b/vendor/wp-now/src/wp-now.ts @@ -130,9 +130,7 @@ export default async function startWPNow( cwd: requestHandler.documentRoot, recreateRuntime: async () => { output?.log( 'Recreating and rotating PHP runtime' ); - const { php, runtimeId } = await getPHPInstance( options, true, requestHandler ); - await prepareDocumentRoot( php, options ); - await prepareWordPress( php, options ); + const { runtimeId } = await getPHPInstance( options, true, requestHandler ); return runtimeId; }, maxRequests: 400,