Community Documentation

Clearing the theme cache

Last updated April 16, 2011. Created by LeeHunter on November 21, 2008.
Edited by Carolyn, kristofer, k g, add1sun. Log in to edit this page.

The contents of the .info file is cached in the database, so altering it will not be noticed by Drupal. Do not confuse the cache with the theme registry. To clear the cache, do one of the following:

  • Click the "Clear all caches" button located under Performance:
    • Drupal 7: Administration > Configuration > Development > Performance (admin/config/development/performance)
    • Drupal 6: Administer > Site configuration > Performance (admin/settings/performance)
  • Contributed modules:
    • Admin menu has clear cache links beneath the home icon.
    • Devel Block module of the Devel project provides an "Empty cache" link.
    • The API function drupal_rebuild_theme.
    • Some themes (Zen, Fusion, ...) provide a checkbox to rebuild the theme cache on every page, with a nice warning so you don't forget to turn this off.
    • Drush has a command line command: drush cache-clear theme or the shortcut can be used as drush cc all to clear all cache.
  • Visiting the theme selection page will also clear the .info file cache.
    • Drupal 7: Administration > Appearance (admin/appearance)
    • Drupal 6: Administer > Site building > Themes (admin/build/themes)

Comments

ok

This still doesn't clear the theme cache

For drush version 4.5

For drush version 4.5 cache-clear theme does not work. outputs: 'theme' cache is not a valid cache type

nobody click here