Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Install drupal 8, modules and themes from Drush.

By editor , 26 January, 2018
Question

How to install  drupal 8 site (instance), drupal modules and drupal themes from Drush ?

Drush allow to download and install drupal core, drupal modules and drupal themes.
Note : It is recommended to use composer to manage drupal 8, modules and themes.


Download drupal core

- Download the recomended version.
drush dl drupal
- Select the version to download.
drush dl drupal --select

Note : The option --select allow to select the version of the drupal core, drupal module and themes.

Install drupal from drush

drush dl drupal --drupal-project-rename=example
cd example
drush site-install standard --db-url='mysql://[db_user]:[db_pass]@localhost/[db_name]'
Options
--site-name=Example --account-name=admin --account-pass=adminpassword --notify=1
Example : Install a new drupal site.
drush site-install standard --db-url='mysql://drupal:drupal@database/drupal' --site-name=D8 --account-name=admin --account-pass=admin --notify=0

Example : Re-Install a new drupal site in an existence database/settings.
drush site-install standard --site-name=D8 --account-name=admin --account-pass=admin --notify=0

Example : Install drupal 8 using sqlite database
drush site-install standard --db-url='sqlite://sites/default/files/.ht.db.sqlite' --site-name=D8 --account-name=admin --account-pass=admin --notify=0 --account-mail=name@mail.com

Enable few useful contrib modules.

drush en honeypot securelogin pathauto -y
drush en workbench workbench_moderation captcha -y
drush en youtube imce linkit -y
drush en admin_toolbar admin_toolbar_tools -y
drush en coffee -y
drush en workbench workbench_moderation youtube imce linkit captcha honeypot securelogin pathauto -y

Enable drupal development modules.

drush en devel kint simpletest -y
#
drush en honeypot securelogin pathauto youtube imce linkit admin_toolbar admin_toolbar_tools devel kint simpletest -y

 

Tags

  • Drupal 8
  • Drush
  • Shell
  • Linux
Useful Drush commands
Manage custom package using composer.

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer