I would appreciate clarification on this. Why view the themes any different than the plugins? They are in the same category of add-ons that can typically be replaced, depending on how integral the theme and plugin settings are to your site content.
There was a comment made back in 2014 about how the Bedrock themes directory is completely independent of Composer, but if that’s true then it’s just as so for plugins. They appear to be managed very much the same as package types associated with a directory under wp
, so maybe that was the case back then?
The data that fundamentally differentiates WordPress sites are the database state and any other theme/plugin or core-created (what Scott refers to as “user generated”) files, which are exclusively media files saved in the uploads folder. As Bedrock’s docs mention, some plugins, and hopefully not too many themes, create files in other places. The WordPress developer community encourages theme/plugin authors to save persistent data in the database exclusively, favoring the Settings API, but otherwise in the uploads folder if need be, preferably as media attachments or in a folder named after the plugin.
As a result, unless the theme/plugin doesn’t adhere to this good advice, you can expect the uploads folder to be the only place that has data that must correspond with the database in order to not deploy a broken site. It is unclear why Bedrock treats the themes folder like it should be treating the uploads folder.
Also, I would like to try Bedrock and Trellis in a moment here, but I’d like to know where Trellis is on the situation of updating the database with the environment’s site URL in a way that preserves serialized PHP data, as that’s the only way to save your database as SQL that refers to some URL quite a few times in the most random places across different environments with different server names which must be changed from the static database export. There is another thread here discussing various techniques. I recommend, if possible, updating Trellis to require wp-cli so as to use the search-replace
command, even if some other features may be redundant.
I really hope Bedrock has been updated to handle searching and replacing the site URL in the database correctly because this problem is why I created some WordPress git hooks some time ago. I first thought VersionPress was the better solution, but the Root tools are far more comprehensive and what have been missing for some time.
In short, I’d like to engage in a discussion about the benefits of treating the uploads folder and database state (as imported SQL or what have you) as the site’s independent content as opposed to the themes folder, which should be treated as untracked environment-specific files like the plugins. I can change the Bedrock project’s .gitignore
but I was hoping to have a discussion with Roots developers, which might be more involved down the road as I try to get some changes upstream.