Chapter 1: Getting Drupal up and running

Submitted by Michelle on Fri, 02/27/2009 - 17:07

Which version to use

One of the first questions you need to answer is which version to use. In general, it's best to use the current version. This will give you more time before you have to upgrade in order to keep secure. Drupal always has one current core version and one previous that is being maintained. When a new version is released, the one two versions down is retired. There is an endless debate about whether this is good or not but it's something you will need to deal with.

Before you can make that decision, though, you need to look at the modules you are planning to use. Contributed modules usually have a short lag after a new core version is released. For D6, this lag was unusually long; normally it's not nearly as bad. Still, when or even if a given module is updated depends on its maintainer. If a module hasn't been updated to the latest version, your choice is to not use it, use a previous version, or help it along financially or programatically.

The decision on which version to use is unique to each site so this guide can't tell you outright. But a good rule of thumb is to use the current version if most of your modules are ready, especially key and complicated ones. The ones that aren't often (but not always) are better to avoid if possible.

For Coulee Region Online, the first choice was easy. I started it when Drupal 5 had been out just long enough for contrib to catch up. This rebuild, though, has been waiting on Drupal 6 to finally have enough of the many modules I need ready for use. There's still a few shaky spots as of this writing but it's time to make the move and I'll be following either the "work around" or "help along" choices for the ones that aren't quite there.

Installation

This installation guide will be brief, here just for completeness. If you need more detailed instructions, there are guides in the handbook devoted to getting you up and running. As a side note, I highly recommend using a host that allows SSH access. Even if the thought of using linux scares the bejezus out of you, give it a try. You don't need to become a linux guru (I'm not!) to make your life much easier using the command line. As I go along, I'll give instructions using this method so you can see how easy it is but you can, of course, use FTP as well.

Navigate to http://drupal.org/project/drupal
(figure 1)
Choose the version you are going to build in, right click on its download link, and copy the address.
Go to the command line and type wget and then paste the address you just copied and hit enter. The tarball will get sucked down the wire to you.
Type tar -zxvf [file] and hit enter. You'll get a directory with a name like drupal-6.10.
Type mv drupal-6.10 [sitename] where the sitename is the name you want for the directory, the one your (sub)domain points to.

Now if you're like me and don't actually follow the instructions, you'll navigate to your domain at this point. That starts out well enough, giving you the option to install in English or in other languages. I only do English so I choose that one and go on. (figure 2)

Bam! Big nasty error. (figure 3) If you read the install instructions, of course, you won't have that but I seem to forget about it every time so it wouldn't be right not to include it.

Luckily it's easy enough to fix. Go back to the command line and type cd [site directory]/sites/default and then type cp default.settings.php settings.php which copies the default settings.php file to a new file called settings.php. It's a bit of a pain but saves a lot of trouble if you ever want to delete that file because it's owned by you and not by Drupal. Now that you've got the file it's looking for, click try again and move on to setting up the database. (figure 4)

Fill in your database details here. Don't forget that your webhost probably has a prefix automatically added to your database name. So if you called your database "coolsite" it will actually be "assignedprefix_coolsite". Same with the username.

Next, move on to the configuration page. This should al be pretty self explanatory. (figure 5)

Click save and continue and you are taken to the front page of your new site. Yay! (figure 6)