Spring Cleaning Your Drupal Site



April 04, 2009

Many people celebrate spring by doing an intensive cleaning of their house, getting rid of stuff that isn't needed any more, putting away the winter clothes/jackets and cleaning in those places that you don't get to on a daily basis.  It occurred to me that most CMS admins should take on a practice like this at least every year when I started looking at broken links. 

Checking for Bad Links

Now the dead links are inevitable in any website that's up for any length of time.  I was looking for a way to provide a list of broken links when I came upon the Dead Link Checker site.  Just read that if the spider finds a link towards their site, the bot will crawl deeper into your website, cool. This trolls through a site for up to 45 minutes collecting and looking for broken links.  Quite a useful service, and like so many on the web it is free.  There are other ways to check an entire site's links, but generally most free services only allow you to check by the page.  That's useful for any site and is pretty painless (other than tracking down and deciding what to do with the old links). 

Ok, now let's get a bit more Drupaly.  I remembered that I'd installed the Link Checker module which does so much more than the Dead Link checker in that it gives you a nice link to the content that has the error.  It also breaks it down nicely by the type of response code so that you can ignore the redirects if your short on time (and who isn't).  It's also been recently updated for both Drupal 5 & 6.

Checking the Logs

Now most of us don't spend enough time looking at the Top 'page not found' errors (/admin/logs/page-not-found), but it is important to keep an eye on to see what people (or bots) are looking for on your site, but not finding.  For that matter, how are folks getting to your site, Top Referrers, and Top Pages referenced in your site?

You might want to look into non-Drupal page stats too to see more accurate and long-term information.  If you don't check your stats regularly, this is a great time to do it. 

Cleaning up the Content

When you're going through your broken links, you're likely going to hit a lot of pages with content that is really no longer relevant to anyone.  It might be worth going back to your old, old pages in Content Admin (admin/content/) to pull out pages that either don't reflect your current style, have old/wrong information, or are just no longer relevant.  The content is sorted by last modified by default so it should be easy to skip to the last page to get the older stuff.  Might also be a good reminder to install the Scheduler module to clean up that old content.

Taking a moment or two to double check spelling on older articles can be great, as it adds in both accessibility and professionalism.  You may decide that some of the longer articles would benefit from being broken down by adding heading tags (which also helps with accessibility issues).  By looking at your most popular pages you can prioritize those pages that are actively being visited. 

We're also using free tagging and I took this time to review the list of terms I'm using for this vocabulary.  Turns out there was quite a lot of room for streamlining my lists and adding synonyms.  Even the process of ensuring consistent capitalization will help make our site more professional. 

Module Trimming

Most of us look at the thousands of Drupal modules that are installed and are tempted to add in functionality because we can.  Taking a moment to review your list of modules and turn off functionality that you don't use can do a great deal to enhance security, improve performance and make your site easier to maintain.  Less can be more.

I do hope that everyone is staying on top of security upgrades with Drupal.  This isn't something that can wait for an annual review and most security patches should be applied as quickly as possible after Available Updates reports a problem.  You may decide though that you want to apply some recommended module upgrades though in order to enhance your site's functionality.  Do make sure to backup your database before you do this.

And on the Subject of Backups

Checking that your backup routines are working for both the file system and database is pretty critical.  Our backups are only as good as the last time we checked them and sometimes systems change and backups aren't being done properly.  Try to restore your system onto a local install if you've got the time, access and experience. 

Likewise, when you're on your server anyways it would be useful to check to see that there aren't any security updates outstanding (if you're on a dedicated server).  With all your users accounts (including Drupal) it can also be a good time to clear out old user accounts.  Checking Drupal roles & permissions can be quite useful too (as these too can change over time).

Please Add to This List

These are only a few things that need to be done on a routine basis to ensure that your site continues to operate as effectively as possible for your readers.  Please add what you would do (or like to do) routinely to tune up your site.

This article was posted after my note and thought it added some other ideas. Much, much after I posted this article, it inspired this blog post with some other great ideas.

About The Author

Mike Gifford is the founder of OpenConcept Consulting Inc, which he started in 1999. Since then, he has been particularly active in developing and extending open source content management systems to allow people to get closer to their content. Before starting OpenConcept, Mike had worked for a number of national NGOs including Oxfam Canada and Friends of the Earth.