Pages

Saturday, March 26, 2011

Domain Admin for Drupal 7

With over 100 small sites deployed using a mix of technologies, I'm always on the look-out for things that will make my life easier. I currently have 3 Jojo CMS installs, 8 phpLd directories, 6 active blogs on b2evolution and manage 2 Wordpress installs for family members. Each of these pieces of software has limitations and a lack of scalability so the other 100 odd sites I have are created with straight php, but sharing menu structures within the sites and templates and a simple library in a cross-site back-end. There's no database, no CMS, I edit them with the kate text editor on my home PC and then publish them using rsync. Horrible as this sounds, this scales remarkably well. I can manage it pretty well and see myself being able to manage 2 or 3 times as many sites but eventually it starts to get limiting. Currently I can grep the source for common strings I will want to update, but ....



I've been looking for a multi-site CMS that would efficiently manage a near unlimited number of sites for a long time. Occasionally I do a little work on creating my own and the back-end library for my php sites is a draft of some concepts that I would need for that, but creating a CMS from scratch is a big task, especially when you need to avoid the limitations that make other CMS systems unsuitable.

I've recently had a look at Drupal 7. I previously used Drupal 4 about 5 years back and was fairly well impressed, but it didn't have a good way of managing multiple domains and eventually when the two sites Kiore.com and Muffins.co.nz that were on it died, so did my interest in Drupal. Recently I heard about a module "Domain Access" or "DA" for Drupal that allows it to manage multiple sites.

With over 100 small web sites deployed, but without the benefits of a back-end CMS what I can do is all very limited, I can't easily add comments or a forum to sites except by having massively duplicated installs and then I am backing up dozens of databases, managing parallel installs, etc.

I thought Drupal with DA might let me do this, but I am already finding issues with only 5 test sites on it. When I create a node, I see a set of check-boxes, one per domain. 5's manageable, but would 200? Sure, I can set up users who only have access to one domain, but then I'm managing 200 users? (OK, I can set up 50 users with 4 sites each ...) add in the obvious problems with non-node content such as blocks.

Drupal itself is very good and very flexible, but DA has a lot of limitations. It only manages content "nodes" (i.e. pages) it doesn't manage other elements in the site, it comes with integrated add-ons that allow it to manage per-site themes and some other aspects, but it doesn't manage side-bar blocks. There is an add-on that does that, but it isn't released in Drupal 7 yet and I don't know Drupal well enough to make converting this module my first foray into Drupal coding.

As I keep saying, for me it's always a matter of scale. If you have 4 or 5 websites, the pain of the limitations of DA is probably far greater than the extra effort of backing up 5 databases, applying 5 upgrades or 5 copies of changed modules, ... so there really isn't a good use case for sharing databases, or even copies of the code. Move to 15 websites and the advantages of sharing one copy of the code start to show, and shortly after that you'll probably want to think about sharing your database but maintaining separate tables. According to my database server there are 83 tables in my test Drupal instal, some there to support DA, so let's charitably say that each Drupal site adds 50 tables to the database, 100 sites sharing a database this way would have over 5,000 tables in the database -- Can MySQL cope with that and even if it can, will phpmyadmin break?

So this raises the obvious question, what is Domain Access for? It's not a good solution for a small number of sites. It doesn't seem to be a good solution for a very large number of sites. It's probably a good solution for the original use case explained in the readme ... some global content managed centrally, some local content managed by domain specific administrators who each look after 1 domain. The further you get from this use case, the less effective it becomes.

No comments: