Current Articles | RSS Feed
The flexible Drupal content management system (CMS) lets you build all kinds of websites, from simple blogs to complex giant multimedia extravaganzas. You've probably heard the buzz, but maybe you were nervous about trying to install and configure the software yourself. Drupal is well-documented, except for the basic steps to launch a new site. Don't worry – we'll walk through those steps together. With this howto, you just might literally build a new Drupal site in 30 minutes or less.
Everyone wants to know which is the best open source CMS. Most open source CMSes are more alike than different. They use the same LAMP (Linux, Apache or other HTTP server, MySQL or other database, PHP/Perl/Python) stack, and most are administered via a graphical web interface. If you know PHP, or whatever scripting language your CMS is written in, you can customize the software beyond the limitations of its graphical interface. I like Drupal because is it so flexible, and thanks to its giant community of developers cranking out countless themes and plugins, I can tart it up any way I like without having to dig into PHP files.
I'm using Drupal 7 in this how-to because it's the latest stable version. A lot of sites still use Drupal 6, which is a perfectly good version, but it's a little different.
You can install Drupal on a local PC for testing and learning. Start by perusing the Drupal installation guide. Most Linux distributions support Drupal, so check for distro-specific instructions in your distro's documentation. Most web hosting services also support Drupal, so another way to try it out is to add it to an existing hosting account, or open a new cheap hosting account for testing. (Visit webhostingtalk.com for discussions about which hosting services are good.) My web host supports the Softaculous auto-installer for one-click installations and updates. Figure 1 shows what a fresh Drupal installation looks like on my Puppyworld site – not a real site, just a demo I created on tuxcomputing.com for this article.
By default Drupal installs into sitename/drupal (for example tuxcomputing.com/drupal), so you can install it on an existing site without disruption. When you're ready to go live, you can change the root URL to your new Drupal home page, as we will do shortly.
OK, now it's time to have some fun! Log in to your new Drupal 7 installation and check out the Administration interface (Figure 2). See how inviting it is, with Add New Content link and a nice menu bar across the top? It even displays the page title you created during installation. So let's create some content. When you click on Add New Content, a new dialogue opens in an overlay. If you don't like overlays, go to Modules -> Core and uncheck Overlay to make it look like a normal Web page.
Drupal supports several content types, or nodes. Articles, blogs, forums, comments, static pages – all these content types are nodes. By default Article and Basic Page nodes are enabled. You can see the other Drupal content types in Modules -> Core; modules are enabled or disabled with simple checkboxes. Basic Pages are complete standalone web pages, usually used for static content such as About pages and FAQs and usually linked to in your site's main menu. Articles are news stories, blogs, tutorials, deep thoughts – any new content that is dated or time-sensitive.
To get started, we'll create an article. Figure 3 shows the article editing form, which is pretty much like that of any CMS editor. Drupal makes it easy to customize your article summary. You can click the Edit Summary link to expose the summary form, then write a custom summary, or you can type <!--break--> anywhere in the article body to create a summary from the first few sentences of the article.
Way down at the bottom is a Preview button, so you can see what a node looks like before it goes live. Drupal also exposes a number of handy publishing options: Menu Settings, Revision Information, URL Path settings, Comment settings, Authoring information, and Publishing options:
The only ones you need to use at this point are Menu settings and Publishing options. On the Menu settings tab uncheck "Provide a menu link." On the Publishing options tab check "Published" and "Promoted to front page." Click the Save button at the bottom, and then go look at your new front page. When you're logged in you'll see View and Edit tabs (Figure 5). You can open your new front page in a different browser to see how it looks to a site visitor who's not logged in.
Now let's create an About page. Click Add Content -> Basic Page. Create some content in the same way as writing your test article. On the Menu Settings tab, check "Provide a menu link," and enter a menu link title. You can add a description that will pop up on mouseover; I don't care for these, so I leave that field blank. Leave the Parent Item on "Main Menu" and weight at 0:
Click the Save button, and then go admire how your changes look:
Drupal has hundreds of different themes to choose from, so you can pretty up your site and give it a unique appearance. Click Appearance in the main administration menu, and then click Install new theme. Right-click the Themes link and open it a new browser tab or window. Search Drupal 7 themes, and look for themes that are actively maintained and complete. When you find one you like, go to its download page, copy the download link, and paste it into the "Install from a URL field":
Click the Install button, and you should be rewarded with an "Installation was completed successfully" message:
Then you must enable your new theme; click "Enable newly added themes," find your new theme, and click "Enable and set default." Figure 10 shows how Puppyworld looks with the Tapestry theme. Obviously it needs some tweaks, like getting rid of the giant "Tapestry a Drupal Theme" banner. Go to Appearance -> Settings to customize your theme. Depending on what your theme supports, you should be able to change colors, layout, headers and footers, menus, and other page elements without having to dig into the page code.
If I want Puppyworld visitors to find my new Drupal site at tuxcomputing.com, not tuxcomputing.com/drupal, I have to edit two files. First, find or create an .htaccess file for Apache, in your site's root directory, and add these lines:
RewriteEngine onRewriteRule (.*) drupal/$1 [L]
If your Drupal installation is not in a directory named drupal, substitute your directory name in the second line. Then find Drupal's sites/default/setting.php file. It will probably be read-only; change its permissions to 0644 so you can edit it. Find the Base URL section and change it to your own site's base URL, like this:
* It is not allowed to have a trailing slash; Drupal will add it * for you. */$base_url = 'http://www.tuxcomputing.com'; // NO trailing slash!
These two changes activate Apache's URL rewriting module, and automatically forward all requests for tuxcomputing.com to tuxcomputing.com/puppyworld – which is a whole lot easier than moving entire directories of files and changing all their URLs. Don't forget to change the file permissions back to read-only, 0444, when you're done, as a basic security precaution.
What next? The sky's the limit: You can add forums and multimedia galleries, allow user comments, set up multiple site admins, fine-tune the layout and organization, make mobile-friendly pages, and add accessibility features. Drupal allows a high degree of customizability, so you can make your site do pretty much whatever you want. Visit Drupal.org to find more documentation and helpful user communities.
Allowed tags: <a> link, <b> bold, <i> italics