<p>With the release of Craft 3.1 you can now keep fields (and other things) in sync between multiple environments. </p>

<p>Read more here: <a href="https://docs.craftcms.com/v3/project-config.html" rel="nofollow noreferrer">https://docs.craftcms.com/v3/project-config.html</a></p>

CC BY-SA 4.0
2019-03-25T21:01:34.467Z
2019-03-25T21:01:34.467Z
Radmation
<p>See the answer above: project config. </p>

<p><del>You should check out Andrew Welch's post about it:</del></p>

<p><del><a href="https://nystudio107.com/blog/database-asset-syncing-between-environments-in-craft-cms" rel="nofollow noreferrer">https://nystudio107.com/blog/database-asset-syncing-between-environments-in-craft-cms</a></del></p>

<p><del><a href="https://github.com/nystudio107/craft-scripts" rel="nofollow noreferrer">https://github.com/nystudio107/craft-scripts</a></del></p>

<p>ps.: Sorry, Andrew!</p>

CC BY-SA 3.0
2018-02-18T03:47:12.037Z
I need to sync the schema. Best pratice is always go from dev to staging to live during golive. So I need the script which sync merge the settings. But thx for the help!
Visky Máté
CC BY-SA 4.0
2018-02-15T09:58:24.473Z
2020-06-04T19:48:49.943Z
2020-06-04T19:48:49.943Z
Ottó Radics
<p>If you're looking to sync only configuration you shouldn't use the database sync in the article suggested by Otto - that will also bring over content and users and such - unless you intend to create your fields on production and then pull those into dev (which seems like a strange workflow).</p>

<p>There are two ways to do actual schema syncing in Craft 3 that I'm aware of:</p>

<ul>
<li>Writing your own content migrations (using the Craft PHP API to create fields/sections etc by hand)</li>
<li>Use the architect plugin (currently under development) to sync your config by exporting it to json, then importing it on your other environments. <a href="https://github.com/Pennebaker/craft-architect" rel="nofollow noreferrer">https://github.com/Pennebaker/craft-architect</a></li>
</ul>

<p>For Craft 2 there's also Schematic (<a href="https://github.com/nerds-and-company/schematic" rel="nofollow noreferrer">https://github.com/nerds-and-company/schematic</a>) but there's no word on a release for Craft 3 yet.</p>

CC BY-SA 3.0
2018-02-18T03:49:20.813Z
I was trying to find a api doc for that but did but did not get it. We will use that. Could you please link it. I am new in craft yii (coming from laravel) so need to catch up quickly
Visky Máté
CC BY-SA 3.0
2018-02-16T15:27:01.280Z
2018-02-16T15:27:01.280Z
Freek
<p>How can sync the schema (fields + categories + tags + sections) from development to staging and live? Or should I do it manually?
Is there any support to make migration script instead of do it from the webpage</p>

<database>
What is the best practice in Craft 3 to sync schema between environments?
# What is the best practice in Craft 3 to sync schema between environments?

(Asked by: username_0 on 2018-02-15)

How can sync the schema (fields + categories + tags + sections) from development to staging and live? Or should I do it manually?
Is there any support to make migration script instead of do it from the webpage

**Tags:** database

---

## 3 answers

### Answer by username_1 on 2019-03-25. Score: 4 | Accepted answer

With the release of Craft 3.1 you can now keep fields (and other things) in sync between multiple environments.

Read more here: <https://docs.craftcms.com/v3/project-config.html>


---

### Answer by username_2 on 2018-02-15. Score: 3

See the answer above: project config.

~~You should check out Andrew Welch's post about it:~~

~~<https://nystudio107.com/blog/database-asset-syncing-between-environments-in-craft-cms>~~

~~<https://github.com/nystudio107/craft-scripts>~~

ps.: Sorry, Andrew!

> **Comments:**
> **username_0**: I need to sync the schema. Best pratice is always go from dev to staging to live during golive. So I need the script which sync merge the settings. But thx for the help!  

---

### Answer by username_3 on 2018-02-16. Score: 1

If you're looking to sync only configuration you shouldn't use the database sync in the article suggested by Otto - that will also bring over content and users and such - unless you intend to create your fields on production and then pull those into dev (which seems like a strange workflow).

There are two ways to do actual schema syncing in Craft 3 that I'm aware of:

* Writing your own content migrations (using the Craft PHP API to create fields/sections etc by hand)
* Use the architect plugin (currently under development) to sync your config by exporting it to json, then importing it on your other environments. <https://github.com/Pennebaker/craft-architect>

For Craft 2 there's also Schematic (<https://github.com/nerds-and-company/schematic>) but there's no word on a release for Craft 3 yet.

> **Comments:**
> **username_0**: I was trying to find a api doc for that but did but did not get it. We will use that. Could you please link it. I am new in craft yii (coming from laravel) so need to catch up quickly  

---

