I've been hunting through questions here, Discord, Craft docs for solutions for a boilerplate Craft CMS install. Because I want to include section & field configurations, I'm planning on importing an export of the boilerplate database into a new database for the project.
It's documented in a few places that you can run craft setup/security-key
(or craft setup/app-id
) to generate a new key and store it in .env
, but nothing says how that impacts a database that's already established. They all seem to assume you'd run that step before creating the database.
If you clone a project & existing database that's already used that first project's security key, and you want to have a unique security key for the new project, are you breaking the ability to decrypt data that was in the initial project when you generate a new security key? I don't see any indication that Craft updates the database when you generate a new key. It just updates .env
.