Unable to add file to /wordpress/ folder using bootWordPress
bgrgicak opened this issue · 0 comments
bgrgicak commented
When calling bootWordPress we can't use createFiles to add files to the /wordpress/ folder.
For example, if we would update this bootWordPress config by adding another entry to createFiles:
'/wordpress': {
'test.php': '<?php echo "Hello, World!";',
},
This would result in an error.
Error: Could not move /tmp/unzipped-wordpress to /wordpress: Directory not empty.
at _FSHelpers.mv (fs-helpers.ts:109:10)
at PHP.mv (php.ts:885:20)
at unzipWordPress (index.ts:261:7)
at async bootWordPress (boot.ts:68:5)
at async worker-thread.ts?type=module&worker_file=&wpVersion=6.5&phpVersion=8.0&php-extension=iconv&php-exte…:150:26
We prevent WordPress from mounting by writing a file to /wordpress/ before it's mounted.