Print

SiteGround Tutorials


Drupal Tutorial

Introduction to Drupal

Drupal is one of the best Content Management Systems around. Drupal is written in PHP and requires a MySQL database. Its basic installation can be easily turned into many different types of web page - from simple web blogs to large online communities. With SiteGround hosting you can use all Drupal features.

This Drupal tutorial is intended to give you a basic knowledge of Drupal. In order to use Drupal, you don't need any programming experience. After reading the tutorial, you will be able to administer your Drupal system to fit your particular needs.

Drupal Tutorials includes:



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved

You may use this tutorial for your own use. You may not distribute it in any form without the express permission of the publisher. You may provide a link to the publisher's web site, where this tutorial can be used from. This tutorial is provided free of charge and without any warranty of any kind.

Drupal Tutorial

Why Choose Drupal?

Here is a list of the Drupal benefits:

  • Easy to install - Drupal installation described here;
  • Easy to use - no programming knowledge needed! Read through this tutorial to learn the basics of Drupal. Spend 2 hours administering your site. After that you will feel very familiar with Drupal;
  • Lots of features, such as custom search engine friendly URLs(SEF), categories, search function;
  • Lots of modules to add even more functionality to your site;
  • Flexibility - you can easily turn your drupal installation into a forum, faq, blog, wiki and many other types of web sites;
  • Free to use, open source. You can freely install drupal and you can modify the source code to fit your needs, if you want;
  • Lots of users & community - easy to find solutions to your problems. The large community guarantees that Drupal will have a bright future;

Here you can see Typical Drupal Applications



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved

Drupal Tutorial

Examples of Typical Drupal Applications

By enabling and configuring individual modules, an administrator can design a unique site, one which can be used for a combination of knowledge management, web publishing and community interaction purposes.

Here are some typical Drupal usages:

  • Content management - Via a simple, browser-based interface, members can publish stories, blogs, polls, images, forums, etc. Administrators can easily customise the design of their Drupal installation.
  • The flexible classification system allows hierarchical classifications, cross-indexing of posts and multiple category sets for most content types. Access to content is controlled through administrator-defined user permission roles. There is a search option available also.
  • Weblog - A single installation can be configured as an individual personal weblog site or multiple individual weblogs. Drupal supports the Blogger API, provides RSS feeds for each individual blog and can be set to ping weblog directories when new content is posted on the home page.
  • Discussion-based community - A Drupal site can be successfully used as a discussion forum. Comment boards, attached to most content types, make it simple for members to discuss new posts. Administrators can control whether content and comments are posted without approval, with administrator approval or through community moderation. With the built-in news aggregator, communities can subscribe to and then discuss content from other sites.
  • Collaboration - Used for managing the construction of Drupal, the project module is suitable for supporting other open source software projects. The wiki-like collaborative book module includes versions control, making it simple for a group to create, revise and maintain documentation or any other type of text.
  • FAQ - you can use the Drupal installation as a frequently asked questions platform.

For a more comprehensive, please, take a look at the Full Drupal Feature Overview.



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved

Drupal Installation

On SiteGround servers, Drupal can be installed very easily. Open your CPanel and click on the Fantastico De Luxe link. You will see a list of scripts in the left column of the the page.

Drupal - Drupal Installation

  • Look for 'Content management' and click on 'Drupal'.
  • Now click on 'New Installation'.
  • Choose the Drupal installation directory - if you want Drupal to be accessible at yourdomain.com, leave the installation directory empty.
  • If you want drupal to be accessible at yourdomain.com/drupal, enter 'drupal' as installation directory. Proceed using the on-screen instructions.

If you need to manually install Drupal, please follow the manual installation instructions here.



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved
  Next

Manual installation of Drupal

Get a FREE Drupal installation with SiteGround Drupal hosting Package!

In order to install the Drupal CMS application, please follow the step-by-step instructions below:

Step 1: Download the installation file from Drupal.org by choosing the latest stable version and clicking on the Download link next to the package.

Step 2: Upload it in public_html folder of your account. You can do that through an FTP client like FileZilla or via cPanel -> File Manager -> Upload file(s). This way, after the installation is completed, the script will appear once your write something like yourdomainname.com. Or you can create a subfolder there and upload the file in it. The Drupal installation will be available at: yourdomainname.com/subfolder.

Step 3: Once you are in the File Manager, please navigate to the uploaded file and extract it by clicking on Extract link. It will create a subfolder: drupal-x.x.x., where instead of x.x.x. is the current version. So you can move the files one level up in the desired directory. The other option is to extract the file in your computer and then to upload the content in the desired folder via FTP.

Step 4: Once the files are extracted in the desired folder, you should create a MySQL database for Drupal. You can do that from cPanel -> MySQL Databases. There you should create a database and add a user to it - click here to learn how to create MySQL database and user.

Step 5: Navigate to the URL of your Drupal site and run the install.php file (for example http://yourdomainname.com/install.php)

Step 6: Enter the database details for the database which you have created in Step 4. Click on the "Save configuration" button to continue.

Drupal - Drupal manual installation - Save configuration

Step 7: Well done! The installation procedure is finished. You will see the following screen:

Drupal - Drupal manual installation completed

Proceed to your web site.

Step 8: It is time to create an administrator account. Click the "create the first account" link:

Drupal - Drupal manual installation - create the first account

Enter the required username and e-mail address. Once you are ready, click on the "Create new account" button.

Drupal - Drupal manual installation - Create new account

Once you log in the admin area you can change the automatically generated password and enter the other details.



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved
Previous  

How to use Drupal

Logging into Drupal Admin Area

To login into your Drupal Admin area, after installing the Drupal application, you simply need to enter your administrator's credentials into the User login form on your Drupal site:

Drupal - Log into admin

How to create new content?

You can create new content through the Create content section under the Drupal administrator area.

Drupal - Create content

  • The Page option allows you to create a static page;
  • The Story option is suitable for a blog or a discussion usage.

Content Management

In order to manage the content of your Drupal web site, you need to navigate to the Content management section under your administrator area.

Drupal - Content management

In the following lines we will give a brief description of the options under this section:

  • Drupal Categories - Categories menu allows you to classify content into categories and subcategories; You can later add content under these categories. By clicking on the category icon next to each content item you can view all articles under that category. This is helpful if you want to let your visitors view articles/pages with similar content, for example.

Drupal - Drupal Categories

  • Drupal Comments - With the default installation, only users that have logged in can access/post comments. This can be changed from Administer -> User management -> Access control. The comments settings are self-explanatory. By default, registered users can post comments (they don't need to wait for moderator approvals). If you want to let anonymous users post comments, please, go to Administer -> User management -> Access control -> Comment module.

Drupal - Drupal Comments

  • Content - You can manage, view, edit and delete the site content. You can publish and unpublish it.

Drupal - Content

  • Content types - Manage posts by content type, including default status, front page promotion. You can include new content types besides the Page and the Story ones.

Drupal - Content types

  • Post settings - You can control the post behavior, the length of the posts and the number per page.

Drupal - Post settings

  • RSS publishing - You can configure your RSS feed publishing.

Drupal - RSS publishing



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved

Drupal Modules

How to install/enable Drupal Modules

You can enable/disable Drupal Modules from the Drupal Administration area -> Administer -> Site building -> Modules section.

Drupal - Drupal Modules

The default installation of Drupal has many useful modules, and there is a brief description of what each one of the modules does.If you need more modules, you can freely download them from Drupal Modules official website.

On your site, Drupal modules are stored in the Modules subfolder within the Drupal installation directory. You can install additional modules by simply unzipping them to that folder.

How to install/enable Event module

Let's say that you need to install the Event module.

Visit Drupal Modules website and find the Event module. Download it to your local harddrive. Extract the archive using the free copy of Winrar.

Open your CPanel and click the File Manager icon. Navigate to your Drupal installation directory, and then open the Modules folder. Click on the Upload icon and add all files which should be uploaded to the modules folder.

You should now be able to enable the Event module from your administration area.

Drupal - Event module



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved

Drupal Themes

How to change the default Drupal theme?

The default Drupal installation comes with several themes, which could be changed from your administration area. Log in as an administrator, click on Administer -> Site building -> Themes and choose which theme you want to use for your website.

Drupal - Drupal themes

How to install new Drupal themes?

Drupal keeps its skins in the themes subfolder. To install additional themes, you can get the archived theme from the SiteGround Drupal themes gallery and extract the files to the 'themes' subfolder. This can be done through cPanel -> File Manager.

  • Download the theme to your PC.
  • Open your CPanel, and click on the File Manager icon.
  • Using the File Manager, please navigate to your Drupal installation directory. Open the themes folder and click on [Upload file(s)].
  • Now click [Browse]: you will be presented with a filelist from your local PC. Find the theme you have just downloaded (the filename should end with .tar.gz or .zip) and double-click it.
  • Click the [Upload] button and wait for a minute until the theme is uploaded. Click on the newly uploaded tar.gz file and choose extract file contents.

Well done! You have successfully uploaded the new theme on your Drupal system. You should now be able to see the theme at your Drupal Administration Area -> Administer -> Site building -> Themes.

Drupal - Drupal themes



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved

Drupal Users

Managing Users in Drupal

You can manage users' rights from Administer -> User management. Everything is self-explanatory.

Drupal - User management

The only thing you should know is that the default option at Administer -> User management -> User settings is that everyone can create accounts.

Important We would recommend that you set this to 'Visitors can create accounts but administrator approval is required'.



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved

Access Control in Drupal CMS

Using the Drupal access control menu, you can assign/restrict privileges to visitors of your website. The access control list at Administer -> User management -> Access control is quite self-explanatory.

Drupal - Access Control

A typical use of the access control is when you want to make some parts of your site available only to registered users. The default access control rules are quite safe, but you might want to change them to satisfy better your needs. Spend some time playing with the access control menu to better understand what you can do.



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved
Previous Next

Search Engine Friendly URLs

Why Use SEF URLs in Drupal?

Here we will try to explain how you can enable the clean URLs in Drupal in three simple steps. We're happy to inform you that all SiteGround servers fully support the Apache mod_rewrite module and all Drupal users hosted on our servers will be able to use the clean URLs option.

There are only 3 steps you need to follow to enable the Search Engine Friendly URLs. Here we assume that you already have Drupal installed on your account into the /drupal subfolder (www.yourdomainname.com/drupal) and you want to activate the clean URLs.

You have a number of reasons to do this:

  • Your site will look more friendly for the search engines and you will receive better chances to climb up in the search engines rank statistics.
  • The Drupal clean URLs increase the security of your website by making harder for the attackers to find sensitive information about the scripts of your web site.

How to Activate Search Engine Friendly URLs in Drupal?

Step 1: The first step is to log in the cPanel area for your account. Then, please, click on the File Manager icon and navigate to the folder where the Drupal CMS is installed in. (In our example this would be: /public_html/drupal).

Once you are inside the Drupal directory edit the .htaccess file.

Delete the entire content of the .htaccess file and insert the following lines into it:

RewriteEngine on RewriteBase /drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Please mind that you should replace the path in the following line:

RewriteBase /drupal

with the relative path to the directory where Drupal is installed. For example if your Drupal is installed in your web site root folder and you access it via www.yourdomainname.com, the line should look like this:

RewriteBase /

Step 2: The next step is to log into the administrative back end of your Drupal site and enable the "path" module. This module is essential for the clean URLs in Drupal. Once you are logged click on the "Administer" link on the left menu and then on the "Modules" link:

Drupal - Administer - Modules

Scroll down the page, find the "path" module and tick the little check box on the right of the module and simply save the settings:

Drupal - path module

Step 3: The next and the final step is to test the clean URLs and confirm the changes. In the administrative back end point your browser to the "Site configuration" link from the left menu and click on the "Clean URLs" link.

You will not be able to confirm and save the clean URLs change until you test them. Drupal is a smart application :) Once you are in the "Clean URLs" menu, scroll down the page and hit on the "Run the clean URL test" link:

Drupal - Run the clean URL test

If everything is ok the page will be reloaded and you will be able to select the "Enable" radio button and save the changes.

Now load the front end of your site and point the mouse over a link. In the status bar and in the address bar you will notice that all links will be in clean (human readable) format.

Congratulations! You have done a great job!



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved

Drupal Backup

How to Create a Backup of Drupal?

In order to backup your Drupal application you have to:

Step 1: Backup all your files.

Backup all of your files and folders inside your Drupal installation. You can do that by downloading them via your favourite FTP client. You can find our comprehensive FTP tutorial here.

Step 2: Backup/Export your database

Then, you have to export your Drupal database. You can do that by using PHPMyAdmin. Please, check our tutorial on how to backup/restore MySQL database in order to create a backup of your Drupal database.

Important Please, make sure that you choose the correct database, which your Drupal application uses.

If you are unsure what is the name of the database Drupal uses, you will be able to find it in the drupal_folder/sites/default/settings.php file. You can view this file through cPanel -> File manager.

Well done! Now you have a backup copy of your Drupal system!



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved
Previous Next

Drupal Upgade

How to Upgrade your Drupal Application?

Here we will explain in simple steps how you can upgrade your Drupal application to the latest stable version.

Important Before you proceed with the upgrade procedure, please make sure that you have a full backup of your Drupal site.

We assume that your have an outdated version of Drupal installed into a sub folder of your domain (e.g. at www.yourdomainname.com/drupal)

Step 1: The first step is to point your browser to the official Drupal site and download the latest stable release of Drupal on your local harddrive.

Once the download is complete, you need to upload the new version of Drupal on your website. The safest way to do that is to create a new folder in the public_html folder of your website, e.g. drupal_new, and upload the new version files there. Then you need to extract them through cPanel -> File Manager.

Step 2: Once you have the new version uploaded in the drupal_new folder, you should copy the neccesary files and folders from the old version of Drupal to the new one. Here we assume that you already have a full backup of your live Drupal site. Please, navigate to the backup folder of your Drupal site copy the the .htaccess file and the sites and files directories and upload them into the drupal_new folder by overwriting any existing files.

Drupal upgrade

Now, please, navigate to your cPanel -> File manager -> public_html -> drupal_new folder and open the update.php file for editing. Change the following line:

$access_check = TRUE;

with

$access_check = FALSE;

Drupal upgrade.php

Save the changes. The changes above will allow you to run the update.php script from your browser.

Step 3: We are almost done. The next step is to update the database of your Drupal.

In your browser, please type the following URL:

http://yourdomainname.com/drupal_new/update.php,

where yourdomainname.com is replaced with your actual domain name. The screen should look similar to the one below.

Drupal - update the database

Click on the Run the database upgrade script link and follow the instructions.

If there are no errors reported, then your Drupal application is now up to date. Congratulations!

Due to security reasons we should turn the $access_check variable back to true. Please, go to your cPanel -> File manager and open update.php file for editing. Change the following line:

$access_check = FALSE;

with

$access_check = TRUE;

We are now done :) Open a new window in your browser and point it to the site you've just upgraded. As we performed the upgrade in a test folder drupal_new you should point your browser to: http://yourdomainname.com/drupal_new/

Once you are sure that the upgraded version of site works like a charm you can delete or rename the old folder to drupal_old and rename drupal_new to drupal in order to put the new version live.

Drupal upgrade

We're now done. Congratulations! Your site now uses the latest stable version of Drupal.

Please, feel free to contact us if you have any questions or recommendations about this tutorial at: tutorials 'at' siteground.com



Drupal Hosting
(c) Copyright 2005 SiteGround Web Hosting Services. All rights reserved