Drupal Cleanup

cleanupThis is the first in a new series on how to take care of a Drupal site once its built. Drupal is a very powerful content management system that is like a set of Legos with all of the well built functionality that can be added and combined. If you’re building something more involved than a content or blog like site, it’s definitely worth considering. Things like roles, permissions, data querying, taxonomy, groups, working with or wrapping a site in an API, feeds, are all super easy with Drupal.

Key to making your site sing, and perform consistently is post development maintenance. The first step in post development maintenance of a Drupal site we’ll discuss is cleanup.

One of the first steps in preparing to transition a Drupal project from the development phase to ongoing maintenance is cleanup. The goal of cleanup is to remove anything extraneous. You don’t want anything lying around that might be confused for something that’s necessary or that people might feel the need to maintain if it isn’t necessary. Someone should go through and remove any unneeded content types, views, blocks, modules, rolls – anything at all that won’t be used.

A lot of developers don’t really like the idea of maintenance. They enjoy developing sites, but the steps that are required for ongoing care are just too tedious. You’ll definitely see this sentiment if you ask someone to do cleanup as I just described that hasn’t done it before. The most common reaction that I’ve seen is the request is ignored. When asked about it they’ll say it’s not necessary to delete these things as they take up negligible disk space and don’t impact performance at all. There’s no denying that that is most likely true, however the point of cleanup is, as I described earlier, not for performance or storage reasons but to reduce the cost or potential problems with ongoing maintenance.

There’s always the possibility that things will be broken when removing parts. Do your best to find out what really isn’t being used and of course always have back ups and code in version control.

The end result should be a trimmer system without tons of extra items that could confuse users or add maintenance costs for people who did not develop the system originally.

Image credit: Attribution Some rights reserved by jakeliefer



developer, writer, speaker

You may also like...

1 Response

  1. Marc Storms says:

    Hi Josh,
    Thanks for sharing this. I am afraid I am one of the guys that do not love to clean up the things, or better have not find the right tools for doing so.
    Sure, in case of unused modules, Drupal offers help to list them all. And in case of not-used node-types, it is not so hard to check with admin/content/node.
    But… how to discover what blocks or not used, especially in cases where a lot of themes for different subsites are used? And how to discover what images or files are not linked?
    Until now, I realy have not found a solution for doing this on mature sites with thousands of nodes and tens of different people creating them.
    Any suggestion?
    Kind regards,
    Marc http://www.infofluxo.com

Leave a Reply

%d bloggers like this: