How to move a theme to a new location? I have a site (Drupal 8.4.2) that has Bootstrap and a subtheme located in:

/sites/themes/

With the upgrade from 8.3 to 8.4, I have started using Composer, and subsequently used Composer to upgrade Bootstrap. This added it to my composer.json (I'd previously installed Boostrap using drush), but also put the updated version of Bootstrap here (without touching my existing Bootstrap folder):

/sites/themes/contrib/

I removed my existing Bootstrap folder and cleared the cache. However, I can no longer manage the Boostrap theme or my subtheme - I get a 500 error like this:


  PHP Fatal error:  require(): Failed opening required '/var/www/html/drupal/mysite/themes/bootstrap/src/Bootstrap.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/drupal/mysite/vendor/symfony/class-loader/ApcClassLoader.php on line 110


The issue, clearly, is that it's looking for Bootstrap in the old location. The question is - what do I need to do to ensure my site finds Bootstrap in the correct folder? Moving the updated version of Bootstrap from contrib/ to where the original version was located fixes the problem for now, but I'd like to fix it permanently.

I assume there is a config value somewhere that isn't being touched by clearing the cache.
Put your old theme back into the old location.
Enable and set Bartik theme as default theme.
Uninstall the old theme.
Move your old theme to the new location.
Enable the old theme and set as default again.
Uninstall Bartik.


Voilà