28 Apr

Drupal Development for the Absolute Newbie: Part 1 - Wamp/Mamp/Lamp

Today we’re starting a new series of Drupal tutorials here on ThemeShark.com that will focus on Drupal development for newer users - people who may be moving on from other popular CMS solutions like Wordpress or Joomla or just don’t have much experience or professional history in site development to begin with.

It’s no secret by now that Drupal is one of the most powerful open-source solutions available for building everything from tiny personal blogs to larger corporate content sites, and we want to make sure that no one’s overwhelmed right off the bat before getting the chance to dig in and really find out what the CMS has to offer. So our goal here will be to guide green users in building a straight-forward content site that utilizes the most common and useful Drupal modules and offers features common to most Web 2.0 era websites.

We’ll be making a couple assumptions in this series about the reader – mainly that they’re not very experienced in site development at all. Much of what I intend to cover will be child’s play for some, but I’ve often noted that there’s not as much support out there as there could be for individuals who are starting from square one, or at least more accustomed to the elegant albeit plug-n-play nature of Wordpress. I know there’s people out there (I was one of them not too many years ago) that still install and develop their websites right on their webhost, but it’s worth pointing out that the process will flow much more painlessly by developing directly on your own web server that’s set up on your own desktop computer or laptop.

So let’s jump in and start all of this off by downloading and installing a handy little package called Wamp Server if you’re not running it already. Users who’ve already got this going and have Drupal installed on their own web server can skip the remainder of this article entirely.

So, what’s Wamp? Wamp consists of Apache, the web server, MySQL, for managing your database, and PHP. The W in Wamp stands for ‘Windows’, and if you’re developing on Linux or a Mac, you’ll need to grab LAMP or MAMP respectively.

Download: http://www.wampserver.com/dl.php - Wamp Server

Once the file is downloaded, install the package using the default options. You can configure your mail settings if you want, but it’s not necessary for our purposes. Once it’s installed, start Wamp. In Windows you’ll notice an icon that resembles a speedometer shows up on your taskbar (shown below).

wamp_0.pngBefore we continue any further, it’s necessary to set up a database for your Drupal installation. This part is easy: locate that Wamp icon on the lower right of your taskbar, down by the system clock. Left click the icon and scroll up the menu to select ‘phpMyAdmin’. This will open up phpMyAdmin in your default web browser (Hopefully not IE6. If you’re using IE6, update your browser already! It is old and it is tired and it is feeble.) To create the database we’ll be using for this installation, type the name ‘drupal’ into the Create New Database field and click the button labeled ‘Create’. You now have a database to work with.

Now we can install Drupal. Download and unpack the latest Drupal 6.x release and make a new folder in your Wamp ‘www’ directory named ‘drupal’. For example: C:/wamp/www/drupal

Now copy the Drupal files into that directory.

In the address bar of your web browser, now type ‘localhost/drupal’. If you’ve setup everything correctly up until this point you should be faced with the Drupal setup. The database name required is the name of the database you just created, ‘drupal’. Unless you set up a username and password, the username will be ‘root’ and you must leave the password field blank.

One thing that you may want to take note of during the installation process is whether or not CleanURLs are enabled or capable of being enabled. Their status will be presented in the Server Settings box that follows your admin account information during setup. CleanURLs aren’t only ideal for search engine optimization purposes, but they’re also required by a few different modules.

If you can’t select to enable CleanURLs during install, chances are it’s because you don’t have mod_rewrite enabled on your web server. If you’re running WAMP, the solution is easy: left click on the Wamp icon again. A menu will pop up. Locate ‘Apache’, and from the sub-menu select to edit the ‘httpd.conf’. It should open in your text editor of choice.

Using the Find tool from the Edit menu, locate the line #LoadModule rewrite_module modules/mod_rewrite.so. By default it will include the ‘#’ at the beginning, indicating that it is disabled. Delete the ‘#’ and save the file.

In order for your changes to take effect, you must first restart all services, by once again left clicking on the Wamp icon and selecting, low and behold, ‘Restart All Services’. You should now be able to enable the CleanURLs. If you plowed through the Drupal installation already, you can enable CleanURLs after the fact by nagivigating to Administer > Site Configuration > Clean URLs.

Alright, so now that’s taken care of, install Drupal. No problem.

In the next installment of Drupal Development for the Absolute Newbie we’ll be setting up basic image handling support and a WYSIWYG editor (What You See Is What You Get) to assist in content creation.

Support hours: 9AM - 5PM EST, Mon - Fri

Follow us on: