Facebook Google Plus LinkedIn Pinterest Twitter Yelp

Goldlilys Media

San Diego Web Design and Development For Growing Businesses

What is Drupal and how to set it up for Shared Server environment?

November 2, 2010 - 1:32pm -- goldlilys
What is Drupal and how to set it up for Shared Server environment?

As a web developer, I've come across many different types of Content Management Systems (CMS for short). CMS is a web application that allows web publishers to easily manage their contents without the need to know how to code. It is the job of a web developer to make this possible for non-technical companies to have a professional looking website in order to gain more business.

In the past, I've used Yacs, Wordpress, and tried other CMS recommended by others from CMS Matrix. Then I came across Drupal, which I pitch as a CMS builder of CMSs. It can be used to make simple sites even simpler and complex ones like social networking sites even more robust, sophisticated, user-friendly and feature packed. All it needs are web developers who have the imagination and creativity to create something out of small bits of modules and combine them together.

In this article, I present to you a tutorial on how to set up Drupal in a Shared Server environment. Meaning it's for those web developers who don't have access to the Linux command line. I also prefer making a multisite installation using subdomains instead of subdirectories. The set up is similar for both, but it can get annoying to have to change paths when making a site live in subdirectories. This tutorial is for beginners in Drupal, but must have some knowledge in XHTML, CSS, PHP and MySQL. Tutorials for theming and modules will be discussed in later posts.

  1. Download Drupal and extract it using Winzip or Winrar.
  2. Rename the folder to drupal and upload the entire folder using an FTP client (recommend Filezilla). Or, if available, without extracting yet, you can upload the tar file directly to your server and extract it using the cPanel's File Manager.
  3. Once the drupal directory is on the server, you want to create a symlink of your new site to that drupal directory for a multisite installation. We want drupal to be in its own directory instead of the root in case you want to have additional applications in the future. Lessen the confusion of which files belong to which software. Since you do not have access to the Linux command line, use PHP function symlink:

    <php $target = '/home//public_html/drupal'; // root directory to drupal $link = ''; // use lowercase letters symlink($target, $link); echo readlink($link); // will return path to the newly created directory if success or error if failed. ?>

    If you mess up, you can delete the symlink using:

    <php $link = ''; unlink($link); ?>

    Never delete symlinks straight from Filezilla because this will delete the entire drupal directory. Meaning if you have other sites already set up in drupal, all your hard work will be gone.

  4. Make sure that the symlink works by clicking on it in Filezilla and it should redirect you to the drupal directory.
  5. Now you want to create a subdomain for your new site in cPanel and point it to the symlink you just created. As long as the subdomain and symlink directory have the same name, it should automatically find the path.
  6. Set up a database for your new site and have your username, password and databasename handy.
  7. Go back to Filezilla and visit drupal/sites/default and rename the default.settings.php to settings.php.
  8. In drupal/sites directory, create a new directory called <sitename>.examples.com . Then inside this directory, create a new folder called files and give it 777 permission. And another folder called themes (theming tutorial will be explained on another article). Copy and paste settings.php to the <sitename>.examples.com directory and give it 777 permission.
  9. Use a browser (preferably Firefox or Chrome), visit <sitename>.examples.com and follow the Drupal installation process. Input the database info and create an admin username and password that only you should have access to.
  10. Once Drupal is installed, go back to Filezilla and permanently change settings.php to 644 permission.
  11. Voila, now you have set up your first Drupal site.

On the next articles, I'll explain which modules are mandatory to have for a functional site. As well as a beginner tutorial to theming.

Blog Category: Web Tools: Services:

Grow Your Business!

Want more business insights, life improvements and website benefits ?

Contact Info

619.265.6389
Address:

Hera Hub Mission Valley
8885 Rio San Diego Drive, Suite 237
San Diego, CA 92108

Hera Hub Sorrento Valley
4010 Sorrento Valley Blvd, Suite 400
San Diego, CA 92121

Office Hours:

Monday - Friday 10am - 5pm

For a consultation, schedule an appointment.

Goldlilys Media Tweets