Thinking of trying the Drupal open source content management system? It’s a powerful platform, but the learning curve can be steep, even if you’re already comfortable with its underlying technologies: PHP, MySQL and CSS. As the volunteer webmaster for the Monterey County (California) Democrats, I’ve gotten deeper into this stuff than I ever anticipated, and believe me, I know that learning curve well. Here’s a list of some of the top gotchas. Some of them are just plain good web development practice, but they become especially important with Drupal, and even more so if you’re using the CiviCRM contact relationship management module.
- Create a test site first, then deploy on your live site. Even experienced users find themselves with a site that has suddenly gone crazy or dead after an update, and you want to be fixing the problem on the test site, not the live one.
- Backup up your site files and MySQL DB regularly! Especially before any significant changes, such as an update (within a major software release) or an upgrade (from one major release to another). Drupal provides automated update/upgrade tools, but you can’t always be sure they’ll work with your configuration. And if they don’t, you could be in serious trouble if you have no backup, as your DB might get corrupted. And remember to log in as the admin user (user 1) before doing the backup. It’ll make it easier to get back in control if you have to restore the site.
- If you work on a Mac, remember that you may need to convert Mac carriage returns to Unix newlines before uploading a file. For example, if you dump a DB file to your Mac (as you might during a backup), restoring it may fail if you neglect to replace the carriage returns. You can use this shell command in the Mac Terminal:
tr ‘\r’ ‘\n’ 〈MacFileName.xxx〉UnixFileName.xxx - Pay careful attention if you make any changes to settings.php or civicrm.settings.php (if you’re using CiviCRM). These files identify where your DB is and how to log into it, among other important details. Making a typo here is a common source of sites turning into blank screens.
- Caches, cookies and session files are often sources of strange behavior. After updates and upgrades, or on occasion when the site is acting oddly, you may need to empty (not drop) your DB’s cache and/or session tables (you can use PHPMyAdmin, provided by many web hosts). You may also find that clearing your browser’s cookies and emptying its cache will fix some misbehaviors (such as not being able to log into your site).
- When moving or copying your site files, keep track of the invisible file .htaccess. A missing .htaccess file (as can happen if you do a “cp *” shell command) will break the site.
- Check that all your Drupal access permissions are in order. For example, if anonymous users don’t have access to nodes, they won’t be able to see any content.
- When upgrading, make sure to disable all 3rd party modules first, and then re-enable them after the upgrade - checking that you have the latest, compatible version of each. Modules are a leading source of weirdness during upgrades.
- If you upgrade CiviCRM, make sure you remove all previous CiviCRM files from the site’s modules directory (back them up first!). CiviCRM will search throughout that branch of the directory tree, and all kinds of confusion will result if old files are hanging around.
- And pay careful attention to compatibility among your versions of Drupal, Drupal’s themes, 3rd party Drupal modules, CiviCRM, PHP, MySQL and Apache. Before upgrading, make a compatibility matrix to make sure everything you need will still work after the upgrade.


Wow, all links but the *democrats.org are broken? I guess we can blame the republicans for that one too, eh?
Hi Spencer. Your links to drupal, phpmyadmin and civicrm are all bad...
Nice roundup. Some are a bit obvious and "duh", but nice little checklist to keep in mind. Thanks.
Your points 1-6 and 10 are good advice for nearly any web based application, not just Drupal/CiviCRM. Point 7 is well taken and still trips me up occasionally!
The Drupal community have produced screencast videos on Drupal in general and the installation and upgrade process in particular: http://drupal.org/videocasts. A good resource for people new to Drupal and faced with an upgrade.
The first link in your article is wrong.. what kind of URL is "http://drupal/" ? Then you link to "http://civicrm/". And then "http://phpmyadmin/". Kinda lost respect there for you..
> what kind of URL is "http://drupal/" ? Then you link to "http://civicrm/". And then "http://phpmyadmin/"
umm, the non-working kind?
We actually stick with Joomla and SugarCRM to achieve this sort of configuration simply because its so much easier to use and manage.
bub buh but...
joomla is just too difficult to configure. sorry!
[full disclosure, I am the managing partner at CivicSpace]
Or you can avoid most of these issues by using a turn-key ASP service like CivicSpace which pre-configures CiviCRM and Drupal into a service that can be accessed by filling out a simple wizard on the CivicSpace website.
Sorry to be slow catching up with these comments, which are appreciated...
Tom, thinkx, Anonymous: Not sure what caused the problem with the links, although it looks like something was truncating the urls. They were all fine when I posted, and I see they work now.
David: Yes, I think CivicSpace can be a very good choice, and have written about it here:
http://www.oreillynet.com/onlamp/blog/2007/01/digital_politics_from_civicspa.html
and interviewed Zack Rosen here:
http://www.oreillynet.com/onlamp/blog/2006/05/digital_politics_an_interview.html
links are broken - still!
Links are fixed (again). I don't know what the gremlin is with this post, haven't had this problem with any others. Am I missing something about Movable Type?
sorry if it was too obsolete issue. some guys in http://www.nicklewis.org/node/766 said civicrm is not for drupal. it was for joomla. any good real sample live site everyone can point to that drupal and civicrm can actually play together? much appreciated. thanks
gausarts: Nick Lewis' post (which is very useful - thanks for the link) seems to be referring to Drupal 4.7. Drupal is on version 5.2 now, and while CiviCRM is not trouble-free, it does work well with Drupal and is being used in many, many Drupal sites, including by me.