I have migrated my site to different server and I am redirected to install.php page.

Here is the steps I have done:

  1. zip whole site and extract it in new server.
  2. export database and import it to new database (using phpmyadmin)
  3. modify database credential in site/defaults/setting.php

any idea why drupal redirects to install page?

  • 1
    It redirects if it can't find a valid DB connection, or the data it's expecting in the database once it has connected
    – Clive
    Jan 31, 2020 at 8:52
  • the DB connection is valid. i had tested it
    – Saf
    Jan 31, 2020 at 8:53
  • the data it's expecting in the database once it has connected i didn't get what you mean
    – Saf
    Jan 31, 2020 at 8:54
  • If the tables are wrongly named, for example, or they don't have the right data in them. You can follow the logic yourself from DrupalKernel::handle(). You need to determine why Database::getConnectionInfo() or drupal_installation_attempted() are returning falsey values
    – Clive
    Jan 31, 2020 at 8:58
  • how the table can be wrongly when I am export it from one db and import it in another. By the way both Database::getConnectionInfo(), drupal_installation_attempted() not false
    – Saf
    Jan 31, 2020 at 9:03

2 Answers 2


I encountered the same issue today (my site kept redirecting to install.php after migration to new host) and spent half-a-day troubleshooting. The db connection was OK. I double-checked that the db-name, db-user, and db-user-pass are correct in the site/defaults/setting.php In the end, it turned out that when I exported the database from my previous hosting, the names of the tables were prepended with a prefix. After importing the tables in the new database, I didn't specify the prefix in the settings.php file. Therefore, drupal was not able to locate the correct tables, because it looked for the users table but in the db, that table was actually named prefix_users and so on.

$databases['default']['default'] = array ( 'database' => '', 'username' => '', 'password' => '', 'prefix' => '!!!', 'host' => 'localhost', 'port' => '', 'namespace' => 'Drupal\Core\Database\Driver\mysql', 'driver' => 'mysql', );

Hope it helps!


Maybe it's file permission problem. Try to set the owner of the web-root of Drupal installation:


Especially it's file permission problem of the settings.php. If your web server can't read this file, the new install process is started and redirects to /core/install.php

If it helps so you can go on with more secure file permission setting described here: https://www.drupal.org/node/244924


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.