Creating Your First Site with Drupal 8

Creating Your First Site with Drupal 8

We have been hearing about Drupal 8 for quite a while now and it’s sounding increasingly exciting and close. After DrupalCon Amsterdam I was keen to get my hands dirtier with Drupal 8 and try building a website with it.

I decided to use a practical example as that’s generally a better approach than messing around with a fake idea. I decided to try and use the redevelopment of my Wife’s site, “A Travelling Cook”, as it is a simple site, so seemed like a good case study.

 

Installation

Installation of Drupal 8 is much the same as before, however you do need mod_rewrite enabled. The installer doesn’t directly mention this, but post-installation will fail if you don’t. Installation is somewhat easier, as you can now use a database user with the correct permissions and databases are all created for you.

You will need to duplicate additional files as part of the installation process, so pay attention to the instruction screens. Interestingly, the traditional ‘sites’ folder and its subfolders can be used as we are all used to, but don’t need to be, you can actually now add things to the top level of Drupal. I’m not entirely sure how I feel about this yet, or how this will affect many of our existing deployment strategies.

 

Multisite

If you want to use multisite, you have to add entries to the ‘sites/sites.php’ folder for the multisite folders to be recognised, there are examples in the folder.

 

Initial Impressions

Initially, nothing will look that different really, admin sections are slightly reorganised and you have a new admin menu, but if you have been using Drupal for a while, it will look fairly familiar.

 

Setting Up Content Types

This is a pretty similar process to Drupal 7, some differences, but you should be able to figure out what’s what. There are a few more field types built in, such as ‘Entity Reference’, which makes sense for Drupal. There is also now an inbuilt option for managing node edit forms, another great ‘out of the box’ new feature.

 

Modules, Modules, Modules

This is unfortunately where I came unstuck and (spoiler alert) had to give up the adventure. Whilst there are several D8 versions of modules available, such as Drush and Devel (and of course several useful modules in core), but there were too many others just not yet available. For example:

  • I needed to import 90 items of content, the current site is in Blogger, which doesn’t give you database access so I couldn’t use Migrate module, well, not without all sorts of additional intermediary steps. A Drupal 8 version of feeds is in development, but encourages you to not use it yet and has limited options right now.
  • If you want to make a live production site, then several modules that are useful for SEO and general user-friendliness are not yet available, such as Path Auto and Google Analytics.

 

Problems

I did get a lot of unusual errors, most of which could be fixed through file and database cache clears, but they weren’t always clear as to the reason. 

If you move or rename the location of your site, you will find that Drupal 8’s new Configuration Management features might cause your entire site to break as it can no longer find the locations for the configuration files it expects. So make sure you change the paths in the site’s settings file.

There is also an error that may or may not occur if you update Drupal 8 core. Somewhere along the way, the ‘classy’ theme became the base theme for many other themes and if it’s not enabled before the upgrade, your site will break. I found by commenting out certain lines in core I could get things working sufficiently that I could enable it, uncomment the lines and get back to normality.

 

Conclusion - Not Ready for Live Sites

I’m sure anyone could have told me this, but still, it was interesting to try. Whilst Drupal 8 is now stable enough for experimentation or Developer playground sites, if you’re trying to create a site that non-technical folks and end users will use and enjoy, it is not ready.

Some of this is down to instability, but it’s also the age old issue that new versions of Drupal always have, the lack of necessary modules. The inclusion of some of these in core makes things somewhat easier, but there are still a few that I think every site needs before I can happily use Drupal 8 in the wild.