Drupal 8 Development

We're learning Drupal 8 and writing about it here.

Drush for Drupal 8

Drush 6, the current stable version, does not work with Drupal 8. We will need Drush 7 for that. See https://github.com/drush-ops/drush#drush-versions.

Drush 7 is not stable yet so we want to keep running Drush 6 for Drupal 7 but use Drush 7 with Drupal 8. Here’s how you can run multiple versions of Drush:

Step 1

Get Drush 7 via git. You could clone it to your home directory.

1
$ git clone https://github.com/drush-ops/drush.git ~/drush7
Step 2

Setup a bash alias by adding the following line to ~/.bash_profile or ~/.bashrc.

1
$ alias drush7='~/drush7/drush'
Step 3

Reload ~/.bash_profile or ~/.bashrc.

1
$ source ~/.bash_profile
Test

You should now be able to run Drush commands for drupal 8. Try clearing the cache with:

1
$ drush7 cc all

Installing Drupal 8

Drupal 8 Installation

Getting Drupal 8

Drupal 8 is still pretty much in development, so there is no release on drupal.org yet. The best way to get the latest Drupal 8 is via git.

git clone --branch 8.x http://git.drupal.org/project/drupal.git drupal8

Notes

  1. Drupal 8 requires PHP 5.3. You’ll need to set this up. More info here.
  2. Drush 6 is not going to work with Drupal 8. We’ll need the use the development version Drush 7. See https://github.com/drush-ops/drush#drush-versions.

Installation

Once you’ve cloned the Drupal code, set up your files (sites/default/files) directory and copy default.settings.php to settings.php. Next point your browser to your Drupal 8 codebase.

Drupal 8 installation is very similar to Drupal 7, so nothing too difficult here. Note the awesome new theme.

Drupal is installed. What’s different here?

Here are a few things to note:

  1. The following modules are now in core and enabled by default (using the standard profile)
    • views
    • ckeditor: The WYSIWYG editor for Drupal 8
    • tour: Provides guided tours.
    • entity_reference: Provides field for referencing other entities
    • And yes, toolbar and overlay are still around.
  2. Unlike Drupal 7, you’re not logged in as administrator/user 1 after setup.
  3. Bartik is now responsive.
  4. Contact is now enabled in the standard profile and now accessible to anonymous users by default. Good.