Description of the need
When .htaccess
, robots.txt
, or settings.php
have been updated in a release, we should update them when safe/possible
Proposed solution
We could store a hash of the previous version of the file in state. When doing an update, check the hash in state to see if the contents of the file has been changed. If not, we can overwrite it (assuming Backdrop has permissions to write to files outside of core) and update the hash with the hash of the new file.
Alternatives that have been considered
- https://github.com/backdrop/backdrop-issues/issues/5911 (but I think we should do both)
Draft of feature description for Press Release (1 paragraph at most)
Backdrop core can now automatically update files outside the core directory -- assuming they have not been previously modified and that Backdrop has permission to write to those files.
Recent comments
Thanks! The site was on PHP 7.0. With assistance from my hosting provider, I updated to PHP 7.4 and now I have access to the site again. No database re-import required.
Locked out of site after updating modules
Thank you very much. I will follow your advice.
Locked out of site after updating modules
The best you can do is test and report. If you find a contrib that doesn't work in php 8.3, create an issue in its queue so it gets fixed. In my experience, I've found that 7.4 is safest...
Locked out of site after updating modules