I frequently forget that specific menu items are in the database and not in the config files. I believe the same is true for taxonomy terms. There is a long discussion about this specifically related to taxonomy in this topic: https://forum.backdropcms.org/forum-topic/config-files-vs-db

I understand that the distinction between what goes in database and what goes into config files is sometimes a little arbitrary. That's fine, but what is the easiest way to track what goes where?

Is there a reference anywhere that makes explicit what information goes into config files and what goes into the database?

Comments

I believe both terms and menu items are in the database. There are some menu items in code, but that's not the same as config.

Menus and vocabularies are in config. Content types are in config. Content is in the database. Custom blocks are in config.

I remember in the past being told that there was a UI feature that helps make clear when you are saving something, if you are saving it to config or to the database. I looked, but it was not clear to me what that UI feature was. 

I now notice that some save buttons say "Save" and some say "Save Configuration." I'm guessing that the latter is an indication that what you are saving will be stored in config files.  :-)

Also, while content types are stored in "config" they also require tables that are in the database, so it's not clear to me that I can move a content type from one environment to another in config files alone. This trips me up frequently. 

drop's picture

I remember in the past being told that there was a UI feature that helps make clear when you are saving something, if you are saving it to config or to the database. I looked, but it was not clear to me what that UI feature was. 

It's the name of the button you click to change something. If the button says "Edit" then the thing you are editing is going to be saved in the database, for example: 

nodes = edit
Nodes are saved in the database, so the link reads "edit".

If on the other hand, the link you clikced to configure the thing reads "configure" then that thing will be saved into config files, for example: 

Image styles are saved in config, so the link reads "configure".

Also, while content types are stored in "config" they also require tables that are in the database, so it's not clear to me that I can move a content type from one environment to another in config files alone. This trips me up frequently. 

You can, but only by using the "Synchronize" functionality in configuration management. Copying config files from the `active` directory of one site to another would not work -- because the matching database tables would be missing. However, if you copied the files from the `active` directory on one site, to the `staging` directory on another and then ran the sync, the necessary database tables would be created for you.