Add an interface to edit the .env file

Created on 9 April 2025, 9 days ago

Problem/Motivation

It's currently not possible to easily edit the .env file. This has to be done through the filesystem and in case of remote servers over SSH/FTP.

Proposed resolution

We could add an admin form to edit the .env file, with validation and re-compilation to .env.local.php after submission. We should also add a new permission and mark it as risky.

Feature request
Status

Active

Version

1.2

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dieterholvoet
  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    I would advise against this. Just imagine you're using this to store the database credentials, and somebody manages to do a screw up on production wiping the entire file. Meaning if this was done through the UI, Drupal would crash and you have to scramble to find someone to fix the file on the server. You might also not want everyone to be able to get access to those secrets, having the possibility as a site admin to just enable this via a module, seems a bit as a risk to me.

    I guess this can also happen there, but at least a sysadmin shouldn't make such a mistake :-).

  • 🇧🇪Belgium dieterholvoet Brussels

    Thanks for your input! You're right, probably not the best idea. It was worth considering though :).

Production build 0.71.5 2024