This is a demo Drupal site which was built in the Drupal Live Site Build (Using Bootstrap) video series.
WARNING: THIS SITE SHOULD NOT BE USED IN PRODUCTION. USE AT YOUR OWN RISK. UPGRADES WILL NOT BE SUPPORTED.
This site can be set up in two ways: using Lando or custom LAMP/MAMP/XAMPP.
-
Download and Install Lando.
-
Clone this repository.
-
Run
lando start
from within the repository. -
Run
lando install-drupal
command. This will install Drupal using the configuration files withinconfig/sync
. -
Then log into the site (go to
/user/login
): username:admin
and password:admin
.
-
Clone this repository.
-
Run
composer install
from within the cloned repository. -
Go open
web/sites/default/settings.local.php
and scroll to the bottom and modify the$databases
array for custom set up
$databases['default']['default'] = array (
'database' => 'drupal8',
'username' => 'root',
'password' => 'drupal8',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
Make sure you enter in the correct database, username, password and host.
-
Then install the site by running:
./vendor/bin/drush site-install -y --account-pass=admin --existing-config
-
Then log into the site (go to
/user/login
): username:admin
and password:admin
.
$ lando install-drupal
// You are about to CREATE the 'drupal' database. Do you want to continue?: yes.
[warning] Failed to drop or create the database. Do it yourself before installing. ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")
[notice] Starting Drupal installation. This takes a while.
In install.core.inc line 974:
Resolve all issues below to continue the installation. For help configuring your database server, see the <a href="https://www.drupal.org/docs/8/install">installation handbook</a>, or contact your hosting provider.<div class="item-list"><ul><li>Failed
to connect to your database server. The server reports the following message: <em class="placeholder">SQLSTATE[HY000] [2002] Connection refused</em>.<ul><li>Is the database server running?</li><li>Does the database exist or does the database user hav
e sufficient privileges to create the database?</li><li>Have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname and port number?</li></ul></li></ul>
</div>
A: This means that Drush can't connect to the database.
Open web/sites/default/settings.local.php
and make sure the $databases
array is using the credentials below:
$databases['default']['default'] = array (
'database' => 'drupal8',
'username' => 'drupal8',
'password' => 'drupal8',
'prefix' => '',
'host' => 'database',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
- database: drupal8
- username: drupal8
- password: drupal8
- host: database