The website encountered an unexpected error. Please try again later.
This is the message that may appear quite often during migration/reconfiguration procedure. It is too generic to get useful information about what is going wrong. To get more details, change the line of code in
find the line print this message:
print theme('maintenance_page', array('content' => t("The website encountered an unexpected error. Please try again later.")));
and change into:
print theme('maintenance_page', array('content' => t("The website encountered an unexpected error:<br> !message<br> Please try again later.", $error)));
Then much more details will show up to help locating the source of error.
The error is very possible caused by module updates which may cause version conflicts between drupal core or PHP/Database environments. Rebuild registry can help keep consistence in API level to fix the site errors.
To rebuild registry, a drupal module called "registry_rebuild" needs to be installed.
Create 'registry_rebuild' directory under
and download the module
decompress and copy registry_rebuild.php to the module directory. Run
Though Drush never works, still document here for future reference.
install drush tool first. Drush 8.x is the latest version that can work with Drupal 7.
Follow the instructions to install Drush.
Run Drush from <Drupal_root>.
Trying clear cache using Drush:
Drush cc all
To do that manually one have to deal with the database table directly by
truncate all 'cache_ ' tables.