provides software and services that enable enterprises
Live Chat 1-888-673-6564

Open Source Software Technical Articles

  • Home
  • Search
  • Contact Us
  • Products and Support
  • Services
  • Enterprise OSS Blog
  • Wazi Technical Blog
  • About Wazi
  • Attributions and Licensing
  • Supply Chain Compliance
  • How to Contribute
  • Contributors
  • Resources Library
  • Cloud Services
  • Partners
  • Customers
  • Community
  • Company
  • Careers
  • News and Events

Subscribe to Wazi by Email

Your email:


Enterprise Developer Support 24 x 7, Get a Support Quote Now!


click-here-to-chat-with-an-online-representative

download-oss-discovery

Latest Posts

  • A more colorful LibreOffice unveiled
  • Toward a more colorful LibreOffice
  • Flexible administration with Puppet's Facter and templates
  • Knock for OpenSSH
  • Get more out of phpMyAdmin
  • Image annotation in GIMP, Dia, and OpenOffice Draw
  • Solr, Drupal 7, and faceted search
  • Using FreeNAS' new full disk encryption for ZFS
  • Create distributed storage with Gluster
  • How to set up Solr 4.2 on Drupal 7 with Apache

Connect with Us!

Current Articles | RSS Feed RSS Feed

From Zero to Drupal in 30 Minutes

Posted by Carla Schroder on Fri, Jan 06, 2012
  
Email This Email Article  
Tweet  
  

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.



Installing Drupal


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.



[caption id="attachment_101681" align="alignnone" width="550" caption="Figure 1: A fresh Drupal installation for Puppyworld"][/caption]

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.



[caption id="attachment_101683" align="alignnone" width="550" caption="Figure 2"][/caption]

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.


19a98812-f823-48dc-841e-bf029c63c6d7

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.



[caption id="attachment_101686" align="alignnone" width="550" caption="Figure 3: Composing a simple test article"][/caption]

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:



[caption id="attachment_101687" align="alignnone" width="465" caption="Figure 4: A nice set of publishing options all lined up"][/caption]

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.



[caption id="attachment_101689" align="alignnone" width="550" caption="Figure 5"][/caption]

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:



[caption id="attachment_101690" align="alignnone" width="550" caption="Figure 6: Creating an About page, with a link on your main menu"][/caption]

Click the Save button, and then go admire how your changes look:



[caption id="attachment_101691" align="alignnone" width="550" caption="Figure 7: A simple About page"][/caption]

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":



[caption id="attachment_101693" align="alignnone" width="550" caption="Figure 8: Finding and installing a new Drupal theme"][/caption]

Click the Install button, and you should be rewarded with an "Installation was completed successfully" message:



[caption id="attachment_101694" align="alignnone" width="521" caption="Figure 9: A new theme is installed, and now must be enabled"][/caption]

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.



[caption id="attachment_101695" align="alignnone" width="550" caption="Figure 10: Puppyworld with the Tapestry theme"][/caption]

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 on
RewriteRule (.*) 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.

Follow @openlogic
Follow @CloudSwing

This work is licensed under a Creative Commons Attribution 3.0 Unported License
Creative Commons License.Follow @openlogic
Follow @OSCloudServices

This work is licensed under a Creative Commons Attribution 3.0 Unported License
Creative Commons License.
Tags: PHP, Technical, Drupal, Tutorial, CMS

Comments

Currently, there are no comments. Be the first to post one!
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics

Loading...
Error sending email
Email sent successfully

Email article
Email To : 
Your name : 
Message : (maximum 200 characters)
Home | Search | Contact Us | Products and Support | Services | Enterprise OSS Blog | Wazi Technical Blog | Resources Library | Cloud Services | Partners | Customers | Community | Company | Careers | News and Events
Products
OpenLogic Exchange (OLEX)
License Compliance Module
OSS Discovery
OSS Deep Discovery
OpenUpdate
Services
Open Source Support
CentOS Support
Scanning & Compliance
Open Source Training
Professional Services
Solutions
Support & Indemnification
Open Source Governance
Open Source Scanning
Open Source Provisioning
Consulting & Training
Contact Us
1-888-673-6564


© 2013 OpenLogic, Inc. All rights reserved.
Site Map  |  Privacy Policy