Drupal: Difference between revisions

Abmurrow (talk | contribs)
Abmurrow (talk | contribs)
m Added post-install instructions
Line 17: Line 17:


</syntaxhighlight>
</syntaxhighlight>
=== After Installation ===
After installing Drupal using nix, visit the hostname you configured in a web browser and inspect the website. If this is your first time accessing this environment, and you haven't manually imported a database, you will probably need to go through the standard Drupal UI installation process.
<blockquote>'''Note:''' If you install Drupal using the UI, Drupal will make some changes to the <code>settings.php</code> file. These changes '''will be overridden''' next time you rebuild your Drupal project from a newer source. In order to preserve these changes, make sure to add the automatically generated PHP to the <code>extraConfig</code> attribute of your configuration file. You can usually find this located at the bottom of the <code>settings.php</code> file.
<syntaxhighlight lang="nix">
# Example code, do not use this directly. Instead, copy the contents at the end of your settings.php file and place them here.
services.drupal.sites."localhost".extraConfig = ''
// Automatically generated code from Drupal install time.
$databases['default']['default'] = array (
  'database' => 'drupal',
  'username' => 'drupal',
  'password' => 'drupal',
  'prefix' => "",
  'host' => 'localhost',
  'port' => '3306',
  'isolation_level' => 'READ COMMITTED',
  'driver' => 'mysql',
  'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql',
  'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/',
);
'';
</syntaxhighlight></blockquote>


== Configuration ==
== Configuration ==