<p>The <code>useProjectConfigFile</code> config setting was deprecated in Craft 3.5 (and has done nothing since), and was finally completely removed in Craft 4.0.</p>
<p><strong>To fix that error, remove any traces of the <code>useProjectConfigFile</code> config setting from your <code>config/general.php</code> file.</strong></p>
<p>Note that if you previously had this setting set to <code>false</code>, it could be a good idea to familiarise yourself with <a href="https://craftcms.com/knowledge-base/upgrading-to-craft-3-5#project-config-workflow" rel="nofollow noreferrer">the changes Craft 3.5 brought to project config</a> (it has seen no significant changes since, so this is still current info, as of Craft 4.3).</p>
<p>Also good to know, is that the real reason you're getting that exception, is that Craft 4 is more strict about what you can put in the <code>config/general.php</code> file. <strong>In Craft 4 any setting in that file that isn't actually a <a href="https://craftcms.com/docs/4.x/config/general.html" rel="nofollow noreferrer">core config setting</a> – either because it has been removed from core at some point like <code>useProjectConfigFile</code>, or because it's a custom setting – will throw that error.</strong></p>
<p><em>If you have any custom config settings in your <code>general.php</code> file that you want to retain, you can move them to a <code>config/custom.php</code> file, as per <a href="https://craftcms.com/docs/4.x/upgrade.html#config-settings" rel="nofollow noreferrer">the official upgrade guide</a>.</em></p>

CC BY-SA 4.0
2022-11-09T20:18:58.947Z
Thank you so much! And thanks for the extra info. Helped a lot.
Shad
CC BY-SA 4.0
2022-11-09T18:50:14.823Z
2022-11-09T18:56:50.623Z
2022-11-09T18:56:50.623Z
Mats Mikkel Rummelhoff
<p>Working through the upgrade docs, and when I run <code>php craft migrate/all</code> I get the following:</p>
<pre><code>Exception 'yii\base\UnknownPropertyException' with message 'Invalid general config setting: useProjectConfigFile. You can set custom config settings from config/custom.php.'

in /home/user/smw_craft/vendor/craftcms/cms/src/config/GeneralConfig.php:3086

</code></pre>
<p>Kinda stuck. Any thoughts?</p>
<p>Thanks</p>

<install>
"Invalid general config setting: useProjectConfigFile..." when Upgrading
# "Invalid general config setting: useProjectConfigFile..." when Upgrading

(Asked by: username_0 on 2022-11-09)

Working through the upgrade docs, and when I run php craft migrate/all I get the following:
Exception 'yii\base\UnknownPropertyException' with message 'Invalid general config setting: useProjectConfigFile. You can set custom config settings from config/custom.php.'

in /home/user/smw_craft/vendor/craftcms/cms/src/config/GeneralConfig.php:3086


Kinda stuck. Any thoughts?
Thanks

**Tags:** install

---

## 1 answers

### Answer by username_1 on 2022-11-09. Score: 2 | Accepted answer

The `useProjectConfigFile` config setting was deprecated in Craft 3.5 (and has done nothing since), and was finally completely removed in Craft 4.0.

**To fix that error, remove any traces of the `useProjectConfigFile` config setting from your `config/general.php` file.**

Note that if you previously had this setting set to `false`, it could be a good idea to familiarise yourself with [the changes Craft 3.5 brought to project config](https://craftcms.com/knowledge-base/upgrading-to-craft-3-5#project-config-workflow) (it has seen no significant changes since, so this is still current info, as of Craft 4.3).

Also good to know, is that the real reason you're getting that exception, is that Craft 4 is more strict about what you can put in the `config/general.php` file. **In Craft 4 any setting in that file that isn't actually a [core config setting](https://craftcms.com/docs/4.x/config/general.html) – either because it has been removed from core at some point like `useProjectConfigFile`, or because it's a custom setting – will throw that error.**

*If you have any custom config settings in your `general.php` file that you want to retain, you can move them to a `config/custom.php` file, as per [the official upgrade guide](https://craftcms.com/docs/4.x/upgrade.html#config-settings).*

> **Comments:**
> **username_0**: Thank you so much! And thanks for the extra info. Helped a lot.  

---

