In Drupal 8-9, what if my theme does not render as expected?
Twig is used for Drupal 8-9 theming, and it relies on having its own cache of compiled Twig templates, which is separate from other caches that are cleared with the drush cache:rebuild
command in Drupal 8-9. Drupal 8-9 websites on Acquia Cloud Enterprise can run into issues where cached Twig templates fall out of sync on different web server instances when changes to themes are being made and a code deployment has been performed. When you make changes to themes in Drupal 8-9 websites on Acquia Cloud Enterprise, connect to each web server instance and run a command like this, to remove the outdated Twig templates:
drush @[sitename].[prod] --uri=http://[site_URL]/ ev '\Drupal\Core\PhpStorage\PhpStorageFactory::get("twig")->deleteAll();'
This workaround can temporarily be automated via a mix of Cloud Hooks and Cloud API's https://cloudapi.acquia.com/#GET__sites__site_envs__env_servers__server-instance_route
The problem arises from having separate copies of the compiled Twig templates on each web server instance and (the related Drupal core issue https://www.drupal.org/node/2752961).
More information can be found in our product documentation on Known issues in Acquia Cloud.
Acquia Cloud has a script that will clear twig caches when code is deployed to Acquia Cloud, but this may not resolve this problem in all cases.
If your volume is filling due to twig cache files:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Wed Oct 22 2025 09:07:31 GMT+0000 (Coordinated Universal Time)