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
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
See the answer above: project config.
You should check out Andrew Welch's post about it:
ps.: Sorry, Andrew!
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.