I am using Drupal 8, and I am wondering how I can clear more caches than the button in admin/config/development/performance does.

I have had trouble with installing Drush, so I am looking for any alternative solutions.


Just execute core/rebuild.php.
As the documentation says, it rebuilds the cache even when Drupal doesn't work; it require a token you can generate with scripts/rebuild_token_calculator.sh, so you call it as http://example.com/core/rebuild.php?token=TOKEN_YOU_GET_FROM_THE_SCRIPT.

  • 1
    You can avoid the token by temporarily using $settings['rebuild_access'] = TRUE; in your settings.php, too. Just remember to remove it when you are done as it not safe to leave this unprotected on a live site. – mpdonadio Mar 12 '16 at 23:10

Check out Admin Toolbar for Drupal 8, it emulates all the dev functions from a drop down menu like we had in Drupal 7 from Admin Menu. Be sure to activate "Admin Toolbar Extra Tools" as part of the module.

enter image description here


That button clears all caches, just like drush would.

The only alternative to that would be to clear the caches directly in the database, which isn't much convenient.

  • The callback attached to that button does a lot more than just clear caches tables in the database. The biggest differences are probably the container invalidation and the router rebuild that get triggered. – mpdonadio Mar 12 '16 at 21:01
  • Oh, and to be extra clear, that button and drush do the exact same thing and eventually call drupal_flush_all_caches(). It is just that there is more to it than simply truncating the {cache*} tables from the database. – mpdonadio Mar 12 '16 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.