Setting Up Drupal in 10 minutes - 5.7

Sat, 06/14/2008 - 20:31

This is a step by step setup guide for installing and setting up Drupal 5.7 in under 10 minutes. Now there is always something that comes up along the way that may take longer, but about 10 mintues is all it takes.

I put this together because the Drupal documentation assumes that you already know almost everything before you read it. If you are looking to setup a multisite version of Drupal check out my article: Installing a Multi-Site Drupal System. It allows you to run multiple sites on a sinlge code base of Drupal.

 

Initial Setup for Drupal

  1. Download the newest version at Drupal.org
  2. FTP the files into your web server
  3. Create a new folder called "files" inside the Drupal directory and make sure it is writable
  4. Create a DB for your site
    1. Just create the DB (you need the username, password, database name and hostname) and Drupal will load the tables later.
  5. Rename the /drupal/sites/default folder to the name of your wesite
    1. If your site is http://www.example.com then name the folder example.com
    2. If your site is http://dev.example.com then name the folder "dev.example.com"
    3. If your site is http://www.example.com/dev then name the folder example.com with another folder inside it called "/dev"
  6. Edit the htaccess file
    1. Line 68 needs to be activated in all of my installs. Just remove the "#"
      1. #RewriteBase /drupal needs to read RewriteBase /drupal
    2. If you want to direct http://example.com to http://www.example.com then add this below the above section
      1. #redirects non-www to www
        RewriteCond %{HTTP_HOST} ^example.com [NC]
        RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
        #end redirects non-www to www
    3. If you need to you can add
      1. #custom redirects
        RewriteRule ^old.htm$ /new [R=301,L]
        #end custom redirectirect an old address to a new page then add this code
  7. Check the PHP memory in the php.ini file on your Linux server. You will need at least 8mb. More info is available at the Drupal site.
  8. Point the DNS to the root drupal folder. Drupal automatically directs the individual request to drupal/sites/example.com

 

Setting Up Drupal

  1. In your internet browser go to your website
  2. The setup will run you thru adding a new DB.
  3. Create the first account. This will be the "administrator" account for the site, just like when you install Windows XP desktop. Later I will discuss how to create additional administrators
  4. Now that you are logged into your site as the new Admin, go to >>admin>>settings. Most of these settings are very straight forward.
    1. General Settings - fill out all of the info and then activate the Clean URLs. You may need to make adjustments to your Web Server if they cannot be activated. Clean URLs are important for SEO and general usability of web surfers.
    2. Error Handling - You can leave this 'as-is' for now. Later you can create a custom 404 landing page and then set that page address here. Personally I prefer the module Search404. It searches for the words in a mistyped address and then takes the browser to a results page.
    3. File System Settings - Remember the files directory we created earlier? Its was for this section. If you want another folder instead then you can specify it here.
  5. Next Question is for you, its about the users of your site. Do you want other people to be able to create accounts on your site? Do you want additional Administrators?
    1. Go to >>admin>>settings>>users
    2. Here you can set how new accounts are created and what the system's emails messages to new accounts say
    3. Now go to >>Admin>>Access Control to set up an additional "role" for admins or moderators or anything else
      1. Click the "Roles" tab
      2. Type in the name for the role and click 'add'
      3. Click on the 'Permissions' tab and give this user role the permissions they require
  6. NOTE: this site is now live in its basic form. There is still much to do, but the basic ground work is laid out for our next actions.

If you are looking to setup a multisite version of Drupal check out my article: Installing a Multi-Site Drupal System.

Module Activation

Modules are like plugins, extension or addons. They are features that you can select to activate for your site. We don't just want them all activated because too many features can make your site confussing and slow to act. In many cases there are several modules that do the same thing in different ways, so we can choose the one that is right for us.

There are some additional modules that came with the basic installation of Drupal that are either on or off by default. They can be activated/deactivated here: >>Admin>>Modules and the settings for 99% of the modules are here: >>Admin>>Settings

  1. First locate and download new modules from the Drupal Module page
  2. Here are some of my Favorite Modules
    1. AdSense - easily include your adsense into the site
    2. Feedback - This is basically a contact us page
    3. Forward - This puts a link on all of your pages so surfers can email the page link to someone else
    4. Google Analytics - There are two ways to handle web tracking. You can simply insert the code into a side bar 'block' or the 'footer' or you can use this module. The module works great but it is either on or off. There is no controling which pages or which roles it is visible. I prefer placing the code into a block (we'll talk about this later) and then setting the block to disappear when I logon so it won't track me.
    5. Google Sitemap - Must Have . This is a must have module if you care in the slightest about your SEO. There are tons of settings in here and it makes the Google Sitemap process seamless.
    6. GraphStat - this will add some basic web tracking into your site. I much prefer Google Analytics, but it is nice to have the basic info available to me while I am on my site.
    7. Notify - Great help if you want to be notified on every comment or new page created. If you have a huge site many users then get set your email to filter these into a special folder and then you have a make shift log of created content.
    8. Path Auto - you can set the structure of how the URL for each new page is created, rather than manually setting it each time I normally let Path Auto grab it from the date/title
    9. Poormanscron - Must have. Great little module automates the cron process on an hourly process. Cron is used to run tasks for your site. Many of the modules only do there thing when a cron is processed.
    10. RobotsTxt - Must Have. It allows you to edit your robots txt file from the Drupal Admin panel. This is a have to item if you have multiple sites all running on one Drupal code base
    11. Search404 - I love this module. It searches for the words in a mistyped address and then takes the browser to a results page rather than just a missing 404 page.
    12. Service Links - add links to a number of social bookmarking sites, blog search sites etc. I am amazed at how many times I come across one of my pages in someone else's bookmarks online. Great tool to advance your SEO.
    13. Trackback - Must have for bloggers
    14. URL List - Must Have. It creates a txt page with links to every page on your site. Use this to submit to Yahoo and other engines. Use Google Sitemap mentioned above for google.
  3. Check each module to see it there are any required files to install. Some will require a DB table to be added.
    1. I usually copy the DB files into a new folder so they are easy to load into myphpadmin
  4. Activate each module 1 at a time (>>admin>>modules>>)
    1. If you click submit after checking the box on a new module and the browser goes blank but after a refresh of the url the site is back you may have a PHP memory limitation. Check the PHP memory in the php.ini file on your Linux server. You will need at least 8mb. More info is available at the Drupal site.
  5. Now go to the settings for each module (>>admin>>settings) and make sure everything is correct
  6. Lastly we need to make sure that the appropriate people can access our new modules. Go to >>Admin>>Access Control
    1. Check mark which user role can view/edit/admin the variou content types.
    2. Earlier we created an Admin role - give the Admin everything unless they are limited admins
    3. Authinticated means someone with a basic account
    4. Anonyous means your average surfer that comes and goes without creating an account. Search engines will also be anonymous

 

If you are looking to setup a multisite version of Drupal check out my article: Installing a Multi-Site Drupal System.

Tags: