Answers.Body: <blockquote>
  <p>The goal is to eventually upgrade to Craft 4.x, but I thought it would be easier to first update to Craft 3.x</p>
  </blockquote>
  <p>Not just easier; upgrading to the latest 3.x release is a prerequisite for upgrading to Craft 4. But FWIW, it should be completely possible to migrate straight from 2.9.2 to the latest 3.7.x release; I did it just the other day.</p>
  <blockquote>
  <p>Not Supported: Changes to the project config are not possible while in read-only mode.</p>
  </blockquote>
  <p>That error message will appear if something (a migration, in this case) is trying to change something that's tracked in <a href="https://craftcms.com/docs/4.x/project-config.html" rel="nofollow noreferrer">project config</a>, in an environment where the <a href="https://craftcms.com/docs/4.x/config/general.html#allowadminchanges" rel="nofollow noreferrer"><code>allowAdminChanges</code> config setting</a> is set to <code>false</code>.</p>
  <p>To fix the error, make sure that this setting is set to <code>true</code> in the <code>config/general.php</code> file. When you've completed the upgrade, the setting should be set to <code>false</code> in all environments except local/dev.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-02T07:52:38.813Z
Answers.Text: Thanks Mats! I knew about `allowAdminChanges` and was 99% sure that I had it set to true. Turns out that I defined it as a conditional env variable (`$isDev = App::env('ENVIRONMENT') === 'dev';`). This normally works perfectly fine, but it seems like the update really didn't like the condition. When setting `allowAdminChanges` to a fixed value of `true` the update ran perfectly. Thanks!
Answers.UserDisplayName: Sandro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-01T23:01:10.500Z
Answers.LastActivityDate: 2023-03-01T23:01:10.500Z
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Body: <p>I'm trying to upgrade an old Site from Craft 2.9.x. The goal is to eventually upgrade to Craft 4.x, but I thought it would be easier to first update to Craft 3.x. When trying to <code>Finish up</code> my database, I always get the following error:</p>
  <pre><code>Not Supported: Changes to the project config are not possible while in read-only mode.
  Migration: craft\migrations\m180521_173000_initial_yml_and_snapshot
  </code></pre>
  <p>I tried upgrading to Craft 3.2.x and 3.7.x with the same result. I have never heard of any read-only mode in Craft. I found this thread which seems to have a similar issue, but I don't find any working solution in this thread. I know that the error comes from the first time all the YAML files get created (from Craft 3.1.x), but I don't get how I could fix this error. Any inputs?</p>
  
Tags: <error><craft2><updates><upgrades><project.yaml>
Title: Upgrade from craft 2 fails due to read-only mode
ThreadText: # Upgrade from craft 2 fails due to read-only mode
  
  (Asked by: username_0 on 2023-03-01)
  
  I'm trying to upgrade an old Site from Craft 2.9.x. The goal is to eventually upgrade to Craft 4.x, but I thought it would be easier to first update to Craft 3.x. When trying to `Finish up` my database, I always get the following error:
  
  ```
  Not Supported: Changes to the project config are not possible while in read-only mode.
  Migration: craft\migrations\m180521_173000_initial_yml_and_snapshot
  
  ```
  
  I tried upgrading to Craft 3.2.x and 3.7.x with the same result. I have never heard of any read-only mode in Craft. I found this thread which seems to have a similar issue, but I don't find any working solution in this thread. I know that the error comes from the first time all the YAML files get created (from Craft 3.1.x), but I don't get how I could fix this error. Any inputs?
  
  **Tags:** error, craft2, updates, upgrades, project.yaml
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-03-01. Score: 3 | Accepted answer
  
  > The goal is to eventually upgrade to Craft 4.x, but I thought it would be easier to first update to Craft 3.x
  
  Not just easier; upgrading to the latest 3.x release is a prerequisite for upgrading to Craft 4. But FWIW, it should be completely possible to migrate straight from 2.9.2 to the latest 3.7.x release; I did it just the other day.
  
  > Not Supported: Changes to the project config are not possible while in read-only mode.
  
  That error message will appear if something (a migration, in this case) is trying to change something that's tracked in [project config](https://craftcms.com/docs/4.x/project-config.html), in an environment where the [`allowAdminChanges` config setting](https://craftcms.com/docs/4.x/config/general.html#allowadminchanges) is set to `false`.
  
  To fix the error, make sure that this setting is set to `true` in the `config/general.php` file. When you've completed the upgrade, the setting should be set to `false` in all environments except local/dev.
  
  > **Comments:**
  > **username_0**: Thanks username_1! I knew about `allowAdminChanges` and was 99% sure that I had it set to true. Turns out that I defined it as a conditional env variable (`$isDev = App::env('ENVIRONMENT') === 'dev';`). This normally works perfectly fine, but it seems like the update really didn't like the condition. When setting `allowAdminChanges` to a fixed value of `true` the update ran perfectly. Thanks!  
  
  ---
  
  