Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

Crash course: How to make a website with Drupal

Carla Schroder | Sept. 27, 2011
Drupal is an amazing content management system (CMS) that can build pretty much any Web site you want it to -- if you can figure out how. Follow along as I remake my personal Web site, bratgrrl.com, using Drupal.

I still need some front page content, so I'll create an Article. Articles can have menu links, but I haven't created a menu yet for articles, so for now it has no menu link. When the new Article is finished I want it to appear on the front page. Articles placement is controlled in the main Content menu. Figure 6 shows what to do.

The Content menu shows the two new pieces of content. "September 2011 Linux articles" is checked, and under Update Options I have selected "Promote selected content to front page." Click Update, and figure 7 shows the result.

Note that there is a "Read more" link at the end of the article. It should not be there, since the entire article is displayed. The issue of uncontrollable Read More links is a source of woe in Drupal-land with no completely satisfactory resolution that I have found. Try Remove "read more" and display entire content for help.

Going live

When you're ready to go live, you need to edit a couple of files. First find Apache's .htaccess file and add these lines. If your Drupal installation is not in a directory named drupal, then use your directory's name.

RewriteEngine on

RewriteRule (.*) drupal/$1 [L]

Then find Drupal's sites/default/setting.php file. This will probably be read-only, so change its permissions to 0644. Then look for the Base URL section. This snippet shows what mine looks like with a bit of context:

* It is not allowed to have a trailing slash; Drupal will add it

* for you.

*/

$base_url = 'http://www.bratgrrl.com'; // NO trailing slash!

So all you have to do is find the $base_url = line and enter your own base URL, so that visitors see your pretty Drupal site at www.example.com instead of www.example.com/drupal. Then change the file permissions back to read-only, 0444. Do not forget to do this! See Taking Your Site Live to learn more.

Now you are well on your way to building a wonderful site with Drupal. The motherlode of all Drupal information is Drupal.org, so always visit here first for documentation and help.

 

Previous Page  1  2  3 

Sign up for CIO Asia eNewsletters.