After transferring the database + files from development to staging server,
the child theme (parent theme is the default Twenty Seventeen theme)
doesn't load correctly anymore (parent theme functions are missing).
Opening the Theme options page shows a notice that the (child) theme malfunctioned and that the default theme has been activated.
Re-activating the theme afterwards fixes the issue and the child theme loads correctly again.
However, this is not practical when transferring between servers, also there will be always a period where the wrong theme is loaded, it requires extra fixes like re-positioning all the widgets and also doesn't fix the underlying issue.
The reason is the template_root option (
wp @development option get template_root,
wp @staging option get template_root) which stays the same between servers although the paths changed. The paths in .env file have been adjusted for each system (otherwise WordPress wouldn't work at all).
template_root on development server:
template_root on staging/production servers:
Trellis uses timestamped release folders and symlinks for fast switching between them.
template_root is not set by Bedrock using the environment settings but is stored statically in database as a WordPress option and not updated/shimmed by Bedrock.
Edit: There was an issue reported in the past when Bedrock still used Capistrano for deploying: