Last updated May 30, 2013. Created by LeeHunter on November 21, 2008.
Edited by sarahjean, hansrossel, Carolyn, kristofer. 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. Also if you add new tpl.php files or override new theme functions you will need to clear the theme cache before they will be active.

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. Remark that this button clears all caches, not only the theme cache. If you have a site with a lot of pages or a lot of traffic you might prefer to clear only the theme cache with one of the other methods below.
    • Drupal 7: Administration > Configuration > Development > Performance (admin/config/development/performance)
    • Drupal 6: Administer > Site configuration > Performance (admin/settings/performance)
  • Other methods:
    • 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_theme_rebuild (D7) or drupal_rebuild_theme_registry (D6).
    • 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 cc theme-registry.
    • The Magic module has a setting to 'Rebuild Theme Registry on Page Reload' that can be used with any theme.
  • 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)

If all of the above fails, you might also try to clear all caches

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

This still doesn't clear the theme cache

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

...in case someone else lands here, the correct syntax for clearing the theme registry via drush is as follows:

> drush cache-clear 'theme registry' -OR- drush cc 'theme registry'

Both
> drush cache-clear 'theme registry'
and
> drush cc 'theme registry'

Give the error:
'theme registry' cache is not a valid cache type     [error]

Tested on drush version 5.3 on Ubuntu server 10.04.

Use:

drush cc theme-registry

to clear theme registry with Drush