wpstarter: v3 Not Compatible with Pantheon or read-only root file systems
Describe the bug
The new .env handling appears to be attempting to write out a cached PHP file. This is not compatible with read-only file systems or containers, hosting such as Pantheon has a read-only code file system.
To Reproduce
Steps to reproduce the behavior:
- Set the site root with no write permissions, or setup a site on Pantheon.
- See errors in the logs about trying to write
.env.cached.php
file_put_contents(/code/.env.cached.php): Failed to open stream: Permission deniedweb/wp-content/vendor/wecodemore/wpstarter/src/Env/WordPressEnvBridge.php:567
Expected behavior
The use of the .env setup shouldn’t be attempting to write a temporary file in the root of the file system, worst case it should be writing to TEMP space.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (7 by maintainers)
Use
cache-envconfiguration set to false. See https://github.com/wecodemore/wpstarter/blob/version-3/docs/09-Settings-Cheat-Sheet.mdFind out here: https://github.com/wecodemore/wpstarter/blob/version-3/docs/04-WP-Starter-Configuration.md how/where the configuration is set.