Recovering Drupal After an Interrupted Composer Install
A recovery pattern for broken autoloaders and plugin discovery on constrained PHP hosting.
Shared hosting can disable PHP process functions used by Composer plugins. If installation stops after dependencies have started changing, Drupal may bootstrap partially while plugin discovery returns incomplete definitions.
Recognize the symptoms
Field widgets such as string_textfield disappear, Twig reports missing core templates, or services fail to compile even though the referenced files still exist.
Diagnose before changing content
Check drush status, confirm the locked Drupal version, inspect whether core files exist, and compare the generated vendor tree with a healthy environment using the same lock file.
Recover generated dependencies
Preserve the broken runtime as a backup, restore vendor and web/core from a known-good build of the same commit, rebuild caches, and rerun the failed operation. Do not replace the database or custom source code.
Build before deployment
Run Composer, coding standards, and asset builds in Lando or CI. Deploy a complete artifact to constrained hosting instead of building dependencies there.