Rebuilding The Gallery Guide in the open

March 02, 2016

The first decent-sized Drupal site I built was The Gallery Guide - think but for art instead of music. My wife and I built it nearly 7 years ago, and it’s still going, although it’s looking a little creaky these days, and the income from Google ads is so small that I don’t think it even covers its hosting costs. The point of building it wasn’t to make money though - it was to learn about building websites by building a website, and to encourage ourselves to make the most of living in London by visiting more art galleries. At the time, I wasn’t a full-time developer, and I don’t think I would have become one if I hadn’t worked on this project.

As with any project, there are things I’d do differently if I was starting again now. I look at some of the code that’s in there and wince. There are far too many contributed modules, and the design is too cluttered (both visually and technically).

With the Drupal 6 end-of-life announcement, and my own move back to London from Cardiff, it feels like a good time to give the site an overhaul. Upgrade to Drupal 8, make it responsive, improve performance, and generally take a fresh look at it.

In the spirit of designing in the open and sharing what I learn along the way, I thought it would make sense to capture some notes on the process here.

There’s a lot of existing content on the site, so I’m starting with a first pass at migrating it into Drupal 8, so that I can at least see some content and iterate from there. With the Drupal Upgrade module this is fairly straightforward. I’ve already used it to upgrade a simpler site, and it was surprisingly painless.

The first snag, as might be expected, is that a lot of the contrib modules used on the Drupal 6 site aren’t ready for Drupal 8. This is a good opportunity to consider whether they’re actually necessary. Some of them provided functionality that has been included in core, like Node Reference. For some of them, it may well make sense to use alternatives, like Address instead of Location. And some of them maybe shouldn’t have been installed on the site in the first place.

Similarly with the custom modules, there were some very inefficient database queries happening, partly because it was D6, but mostly because I didn’t know any better at the time. As plenty of other people have suggested, the functionality in D8 makes it possible to do much more with core than you could before.

For getting some of the more complex fields in to the new site, I know I’ll need to write some custom code, and this tutorial seems very helpful so far.

I also know that I’ll be trashing my local development site a fair few times in the course of the process, so it makes sense to create an installation profile - this seems pretty similar to D7 profiles, and there’s pretty good documentation.

Hopefully I’ll have more progress to report soon.