Community Documentation

registry_rebuild

7 bootstrap.inc registry_rebuild()
8 bootstrap.inc registry_rebuild()

Rescans all enabled modules and rebuilds the registry.

Rescans all code in modules or includes directories, storing the location of each interface or class in the database.

Related topics

▾ 2 functions call registry_rebuild()

drupal_flush_all_caches in includes/common.inc
Flushes all cached data on the site.
simpletest_clean_environment in modules/simpletest/simpletest.module
Remove all temporary database tables and directories.

File

includes/bootstrap.inc, line 3060
Functions that need to be loaded on every Drupal request.

Code

<?php
function registry_rebuild() {
  system_rebuild_module_data();
  registry_update();
}
?>

Comments

How to Scan All Files (Including Unchanged)

If registry_rebuild() does not produce the results you're looking for (meaning classes are not being found), you can try to truncate table registry_file;. This will cause Drupal to rescan ALL files, resulting in a longer rebuild time, but assuring that all files are re-scanned, including those it thinks have not changed. Be careful though and make sure you have a database backup before going around truncating tables...

Login or register to post comments