this is a massive problem with all kinds of CMS including Drupal which we are using often. Drupal 8 is introducing configuration management, i.e. saving database configuration in yaml files which makes them "gittable". I hope wordpress and other CMS will also adopt this or a similar way.
The Features module in Drupal 7 is a semi-workaround https://www.drupal.org/project/features
but I've hated Drupal a lot because of this. Too much stuff is stored in the DB.