I am using Acquia Dev Desktop 2 on my windows 10 PC in order to develop Drupal 8 websites.
As far as I know, every Drupal website requires a connection between its files and the database which is accomplished by using the following code in the setting.php file.
$databases = array(
'default' => array(
'default' => array(
'database' => 'databasename',
'username' => 'sqlusername',
'password' => 'sqlpassword',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
),
),
);
I downloaded Drupal 8 and I imported it in Acquia Dev Desktop 2 using the Import local Drupal site option.
The site is correctly imported and installed; a new database has been created.
I cannot see the above database connection code anywhere in the settings.php file.
I noticed, however, that the following code is added to the bottom of the setting.php file.
// <DDSETTINGS>
// Please don't edit anything between <DDSETTINGS> tags.
// This section is autogenerated by Acquia Dev Desktop.
if (isset($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR']) && file_exists($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_sitename_dd.inc')) {
require $_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_sitename_dd.inc';
}
// </DDSETTINGS>
How does Acquia Dev Desktop 2 create the connection between the site's files and the database without using the common database connection code shown above?
When moving my website from the local development server (Acquia Dev Desktop) to a remote server, I must create a connection to the database. Is it safe to delete the code between the <DDSETTINGS>
tags added by Acquia Dev Desktop 2*?