<p>The <code>siteUrl</code> setting has been <a href="https://craftcms.com/docs/4.x/upgrade.html#configuration" rel="nofollow noreferrer">deprecated in Craft 3 and removed in Craft 4</a>. Furthermore, Craft 4 removed the ability to set custom config values in <code>general.php</code> (you can now set <a href="https://craftcms.com/docs/4.x/config/#custom-settings" rel="nofollow noreferrer">custom settings in a <code>custom.php</code></a>), so every setting that doesn't exist will result in errors. Remove that setting from your <code>config/general.php</code> or anywhere else the settings might be overwritten and the error should go away. If you have a <code>CRAFT_SITE_URL</code> environment variable, you need to remove that as well, since Craft 4 will <a href="https://craftcms.com/docs/4.x/config/#config-files" rel="nofollow noreferrer">parse environment variables into settings directly</a>.</p>
<p>All of this is mentioned in the upgrade guide linked below – make sure to read that and follow all the steps when updating a site from Craft 3 to 4 (or between any other major versions).</p>
<p><a href="https://craftcms.com/docs/4.x/config/#env" rel="nofollow noreferrer">https://craftcms.com/docs/4.x/config/#env</a></p>

CC BY-SA 4.0
2023-04-26T12:25:20.717Z
2023-04-26T12:25:20.717Z
MoritzLost
<p>I get
Invalid general config setting: SITE_URL
When running the final Craft4 migration CLI</p>
<p>Any ideas?</p>

<migration>
How can I resolve this Craft migration error on running migrate
# How can I resolve this Craft migration error on running migrate

(Asked by: username_0 on 2023-04-26)

I get
Invalid general config setting: SITE\_URL
When running the final Craft4 migration CLI

Any ideas?

**Tags:** migration


---

## 1 answers

### Answer by username_1 on 2023-04-26. Score: 2 | Accepted answer

The `siteUrl` setting has been [deprecated in Craft 3 and removed in Craft 4](https://craftcms.com/docs/4.x/upgrade.html#configuration). Furthermore, Craft 4 removed the ability to set custom config values in `general.php` (you can now set [custom settings in a `custom.php`](https://craftcms.com/docs/4.x/config/#custom-settings)), so every setting that doesn't exist will result in errors. Remove that setting from your `config/general.php` or anywhere else the settings might be overwritten and the error should go away. If you have a `CRAFT_SITE_URL` environment variable, you need to remove that as well, since Craft 4 will [parse environment variables into settings directly](https://craftcms.com/docs/4.x/config/#config-files).

All of this is mentioned in the upgrade guide linked below – make sure to read that and follow all the steps when updating a site from Craft 3 to 4 (or between any other major versions).

<https://craftcms.com/docs/4.x/config/#env>


---

