Skip to content

how to run the drupal 8 install after creating the project with drupal-composer #144

@therobyouknow

Description

@therobyouknow

The usage section in your doc https://github.com/drupal-composer/drupal-project says how to create the project but it doesn't then say how to run the drupal install in order to create the drupal site.

Using the command in your usage section, I ran this command:
composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interaction

(I overcame other issues described here:
#143 )

But the above command does not actually create a drupal 8 site. So I tried to find an answer by searching for one.

I came across this article: https://www.lullabot.com/articles/goodbye-drush-make-hello-composer

  • which says to issue something like your command:

sudo composer create-project drupal-composer/drupal-project:~8.0 drupal --stability dev --no-interaction

and then it says to run the install:


cd drupal/web
../vendor/bin/drush site-install --db-url=mysql://{username}:{password}@localhost/{database}

I tried this, having already created a blank drupal8 mysql database with user.

mysql -uroot -p123
drop DATABASE drupal8; create DATABASE drupal8; GRANT ALL PRIVILEGES ON drupal8.* TO drupal8@localhost IDENTIFIED BY 'drupal8'; quit;

But I got the following error message

$ ../vendor/bin/drush site-install --db-url=mysql://drupal8:drupal8@localhost/drupal8
You are about to DROP all tables in your 'drupal8' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the --notify global option. [ok]
Drupal\Core\Installer\Exception\InstallerException: PHP extensions: Disabled [error]

Array in /var/www/drupal8.dev/web/core/includes/install.core.inc:2162
Stack trace:
#0 /var/www/drupal8.dev/web/core/includes/install.core.inc(1020): install_display_requirements(Array, Array)
#1 /var/www/drupal8.dev/web/core/includes/install.core.inc(654): install_verify_requirements(Array)
#2 /var/www/drupal8.dev/web/core/includes/install.core.inc(532): install_run_task(Array, Array)
#3 /var/www/drupal8.dev/web/core/includes/install.core.inc(116): install_run_tasks(Array)
#4 /var/www/drupal8.dev/vendor/drush/drush/includes/drush.inc(726): install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#5 /var/www/drupal8.dev/vendor/drush/drush/includes/drush.inc(711): drush_call_user_func_array('install_drupal', Array)
#6 /var/www/drupal8.dev/vendor/drush/drush/commands/core/drupal/site_install.inc(80): drush_op('install_drupal', Object(Composer\Autoload\ClassLoader), Array)
#7 /var/www/drupal8.dev/vendor/drush/drush/commands/core/site_install.drush.inc(247): drush_core_site_install_version('standard', Array)
#8 /var/www/drupal8.dev/vendor/drush/drush/includes/command.inc(366): drush_core_site_install()
#9 /var/www/drupal8.dev/vendor/drush/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#10 /var/www/drupal8.dev/vendor/drush/drush/includes/command.inc(185): drush_command()
#11 /var/www/drupal8.dev/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#12 /var/www/drupal8.dev/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#13 /var/www/drupal8.dev/vendor/drush/drush/drush.php(12): drush_main()
#14 {main}

[01:01 PM]-[vagrant@u1404php7]-[/var/www/drupal8.dev/web]
$ ls
autoload.php* core/ index.php* modules/ profiles/ robots.txt* sites/ themes/ update.php* web.config*

[02:26 PM]-[vagrant@u1404php7]-[/var/www/drupal8.dev/web]
$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions