I’m using Trellis with Bedrock to deploy to Kinsta. I’m trying to configure WP Offload Media to upload to Digital Ocean Spaces. The plugin asks me to configure sth like this on wp-config.php:
I don’t know how to put this on my .env file every time I deploy to Kinsta. I was thinking of modifying a bit site/config/application.php but maybe this should be done in a Vault file in trellis/group_vars/production/vault.yml. I don’t know how to do the serialization of an array in a YAML file.
@alwaysblank’s solution is really creative (and works!).
Here’s another solution that should work without any additional tasks. If you define the vault values separately under env, you can define the constant and reference each one like this:
# in vault.yml
vault_wordpress_sites:
example.com:
env:
db_password: example_dbpassword
s3_access_key_id: "whatever"
s3_secret_access_key: "whatever"
# rest of salts etc
Your last snippet should work. Keep in mind Config::define isn’t defining an array; it’s defining a serialized array which is just a string like the other normal constants