3

I've seen many other questions about Craft deployment, some of which even use Git, but none seem to thoroughly address how one would use version control on their local development environment, push changes to a remote repository, and then pull changes down to the staging or production server.

Sure, you can handle modifications to static assets and templates this way, but those changes often require modifications to sections, entries, categories, and globals, all of which are stored in the database. How would one manage the entire website through version control?

Any help is appreciated. Thanks!

| improve this question | | | | |
2

Have a look at the project config feature in craft 3.1, it generates a yaml file describing all developer created data, e.g. fields, sections etc. which can be stored in GIT. However this does not save user created data e.g entries.

https://docs.craftcms.com/v3/project-config.html

Also look at migrations; php scripts to create schema / data in DB. (Which can be stored in GIT) Migration Manager plugin will auto generate them for you

https://docs.craftcms.com/v3/extend/migrations.html

https://packagist.org/packages/firstborn/migrationmanager

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.