Score:1

Can't restore existing site (no route found for "GET /")

ru flag

I have a site with Drupal 9.2.5 and the site was clobbered after installing WordPress in the web root.

I have a backup of the site database, and the sites/default/* files, but I just can't get Drupal up and running again to restore it to the way it was.

I have tried installing again and placing the files back, but this doesn't work.

I have looked at the Drupal docs and searched for migrating or restoring a Drupal site, but nothing seems to be working out.

Once I create a new database, and import all data from the old one, update my settings and restore the folders and files, I get this error:

The website encountered an unexpected error. Please try again later.

Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /"
in Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest()
(line 136 of vendor/symfony/http-kernel/EventListener/RouterListener.php).

I am not sure what to do here: the issue is obviously with routing but I am stuck.

I can get to the install script, but it tells me Drupal is already installed, and to empty the database and start again (not what I want!)

I have tried the upgrade script, but I get an error:

The website encountered an unexpected error. Please try again later.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a
non-existent service "access_check.db_update". in
Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 1032 of vendor/symfony/dependency-injection/ContainerBuilder.php).
Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('access_check.db_update') (Line: 600)
Symfony\Component\DependencyInjection\ContainerBuilder->doGet('access_check.db_update', 1) (Line: 558)
Symfony\Component\DependencyInjection\ContainerBuilder->get('access_check.db_update') (Line: 186)
Drupal\Core\Update\UpdateKernel->handleAccess(Object, Object) (Line: 101)
Drupal\Core\Update\UpdateKernel->handleRaw(Object) (Line: 75)
Drupal\Core\Update\UpdateKernel->handle(Object) (Line: 27)

This is very frustrating. I can't find any useful information on restoring an existing Drupal site and how to do this.

Score:1
fr flag

After restoration the database you need to reload cache. If drush is installed globally you can do it by executing this command from docroot drush cr . If drush is installed locally ../vendor/bin/drush cr

If drush is not installed you need to Truncate cache tables from database. But it should be considered as last resort and not advisable.


TRUNCATE `cachetags`;
TRUNCATE `cache_bootstrap`;
TRUNCATE `cache_config`;
TRUNCATE `cache_container`;
TRUNCATE `cache_data`;
TRUNCATE `cache_default`;
TRUNCATE `cache_discovery`;
TRUNCATE `cache_dynamic_page_cache`;
TRUNCATE `cache_entity`;
TRUNCATE `cache_menu`;
TRUNCATE `cache_page`;
TRUNCATE `cache_render`;
TRUNCATE `cache_rest`;
TRUNCATE `cache_toolbar`;
TRUNCATE `cachetags`;
TRUNCATE `cache_bootstrap`;
TRUNCATE `cache_config`;
TRUNCATE `cache_container`;
TRUNCATE `cache_data`;
TRUNCATE `cache_default`;
TRUNCATE `cache_discovery`;
TRUNCATE `cache_dynamic_page_cache`;
TRUNCATE `cache_entity`;
TRUNCATE `cache_menu`;
TRUNCATE `cache_page`;
TRUNCATE `cache_render`;
TRUNCATE `cache_rest`;
TRUNCATE `cache_toolbar`;

James Young avatar
ru flag
Thank you, my issue was that I tried to restore a database with truncated cache tables. Once I restored the modules and all files in the same place, and imported the database with the cache tables, it worked as expected. (drush did not work for me though).
Ali Mhanna avatar
in flag
thank you , that worked for me
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.