site redirecting to core/install.php after migration
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' =&gt; '',
'username' =&gt; '',
'password' =&gt; '',
'prefix' =&gt; '!!!',
'host' =&gt; 'localhost',
'port' =&gt; '',
'namespace' =&gt; 'Drupal\Core\Database\Driver\mysql',
'driver' =&gt; 'mysql',
);
Hope it helps!