How to Install Drupal Tutorial

Installing Drupal has gotten easier and easier throughout the years. It can be broken down into these steps.

1. Downloading and preparing the Drupal installation files

2. Setting up the mySQL database

3. Running the drupal install program
Downloading and preparing the Drupal install files

You can download the latest drupal installation files from drupal.org. Drupal compresses all of its install files in a tar and gzip format. To extract these on a windows machine you need a special program. There are many of them out there, but one of the easiest (and free open-source) ones to use is 7-Zip. Once you install 7Zip you can right click on the drupal.tar.gz file and click 7-Zip->Extract Here. Then you will have a drupal.tar file in the current folder. Right click and click 7-Zip->Extract Here again and you will have a drupal folder. Copy this folder to your web site folder. If you are using WAMP in the default location it will be c:\wamp\www.

I like to setup my sites under sub folders in the www folder. For example this site is located under the c:\wamp\www\drupal on my local computer. Another site I have that is for Visual Basic tutorials is located under c:\wamp\www\vb6. I highly recommend you do this as well. If you are only administering one site you probably can just copy all of the folders you extracted from the drupal install folder into your root web folder (c:\wamp\www) but than you can only have one drupal installation at a time.

If you do put the files in a sub directory under your main web folder here's what you can do to set things up so that it acts like its own web site (instead of a subdirectory of a web site). If you don't understand what I'm saying follow along and it will make sense. Say that you copied all of the drupal data into a sub folder of your www folder called mysite. Now your web site would be located at (c:\wamp\www\mysite). If you want to go to your web site through a web browser you would type in http://localhost/mysite. The problem is if you upload your new site to (www.mysite.com) anything images or files that are referenced through /mysite/ will be broke. Because of this we need to set up an alias so that you can type http://mysite.localhost into your web browser instead of http://localhost/mysite.

To do this we need to change a couple of files. The first is your apache configuration file (httpd.conf). If you are using the default WAMP install it will be located at c:\wamp\bin\apache\apache2.2.6\conf\http.conf. Open this file in a text editor and find the line that reads:

ServerName localhost:80

Now we are going to add our new sites virtual host information. Add these lines below the ServerName line.

NameVirtualHost *:80

DocumentRoot "c:/wamp/www/"
ServerName localhost

DocumentRoot "c:/wamp/www/mysite"
ServerName mysite.localhost
ServerAlias mysite

This tells apache that anytime someone requests a server through http://localhost it should serve pages located at c:/wamp/www/ where as any time someone requests a server through http://mysite.localhost it should serve pages located at c:/wamp/www/mysite. Now if localhost was actually a domain we owned and registered than we would be done. However, localhost is a unique name that maps to our computer using the loop back ip (127.0.0.1) if you don't know what that means that's ok but basically you need to understand that anytime you type http://localhost Windows looks in a local file finds an entry for localhost and knows to route everything back to this computer. That file is is called the hosts file and it is located at C:\Windows\System32\drivers\etc\hosts. If you open this file in notepad you will see an entry that looks like this:

127.0.0.1 localhost

This tells Windows to reroute any requests to http://localhost back to our computer (127.0.0.1). Below this line we need to add a line that looks like this:

127.0.0.1 mysite.localhost

This will then tell windows to also route any requests to mysite.localhost to our computer. Than apache will see that we are requesting mysite.localhost instead of just localhost and will use the alias we set up in the httpd.conf to serve the files in c:\wamp\www\mysite. Few - that's a lot of explanation for just a few steps, but by understanding all this you are way ahead of the game if you ever want to host your own server down the road. Plus its just good to know.
Setting up the mySQL database

Now that our server settings are all set up and we have the drupal files copied over lets set up our mySQL database. In the past you had to install all of the SQL data using a script. Now, however, all you need to do is set up a blank database and know your username and password. We are going to use phpMyAdmin to do this. If you installed WAMP you can go to http://localhost/phpmyadmin. Once there type in the name for your database (i.e. mysite) under the Create new database field. Then click the Create button. That is it. You can also add a custom user that has access to your database by clicking the Privileges link. If you do this make sure you give that user full access to everything in your mysite database.

Now that you have the database set up you need to remember (or write down) the following information. The name of your database, the username, and the password to access the database.
Running the drupal install program

Installing Drupal is one of the easiest parts of this Drupal tutorial. All you have to do is go to http://mysite.localhost and you should see a screen that looks like this:

If I were you I would probably select english (unless of course you understand another language or want to have some fun). After that it should skip by the verifying requirements sections unless you have an error in your setup. If this is the case follow the onscreen instructions to solve your error.

Next you will enter the database information I told you to remember earlier. Enter the database info, the username, and the password. I would leave the advanced settings alone for now. Click the Save and Continue button.

You should now see a status screen as drupal is installed. It usually only takes a minute or two. Next the Drupal install program will ask you to set up your new site! Type in the info it asks. Make sure you remember the administrator username and password (this is different than your database username and password). You will use this to log in to your drupal site and administer all the different settings and to add content. Also if you have the option I suggest you turn on clean URL's. If you don't do this your web page addresses will look like this http://mysite.localhost/index.php?q='mypage'. If you do turn on clean URL's the same page will have the address http://mysite.localhost/mypage. Also this makes your Drupal site much more likely to be indexed and ranked well by search engines. This is called making your site Search Engine Friendly.

Once you are done setting you will have a full fledged drupal web site up and running. Check it out at mysite.localhost. Have a look around, start changing the default settings. Read on this site more tutorials and have a great time. Once you get your site online somewhere post a comment below letting me know or send me an email. I love to see what people are doing with these tutorials.

Category: 

Drupal Plugin Manager Module

Often I find myself working with my Drupal sites to install add-on modules in order to add some functionality I need or want. In the past the way I did this was by first downloading the module I wanted to my local computer, unzipping it, and then uploading it to my web server that hosts my Drupal site.

Plugin Manger makes this so much easier! In short once you download and install the Plugin Manager module you will then be able to use it to download and install any other Drupal modules directly to your server. No need to first download them to your local computer or anywhere else. This tutorial will show you exactly how.
Step 1) Download Plugin Manager and install it.

You will be able to find the plugin manager here: Plugin Manager Module Page). Once you have it downloaded, unzip it, and upload it to your server: under the /sites/all/modules/ folder (this will be the last time you will ever have to do this).

Then go to the your modules page (http://yoursite.com/admin/build/modules/list) and check the Enabled box next to the Plugin Manager module (it is under the Administration Category) . This will enable Plugin Manger.

Plugin Manager Selection
Step 2) Plugin Manager Search Capabilities

Under your Admin menu you should now see a new link labeld “Plugin Manager”.

Plugin Manager Admin Link

Under that is a link to Search (http://yoursite.com/admin/plugin_manager/search). Now you can either expand a category and browse all of the modules or you can use the search feature to hunt down a module you are looking for.

To try this out lets select the Agreement module. Click the Add button next to it.

Click Add by Agreement Module

Now at the top of the screen (just below the search bar) you will see Install Queue (1). And beside that you will see a button that says Install Queued Plugins. Click that button.

Click Install Queued Plugins
Step 3) Install Queued Modules

If you aren’t already there, navigate to the Admin, Plugin Manager, Install area (http://yoursite.com/admin/plugin_manager/install). The Installation method should be ftp. You can probably leave your hostname as localhost. Although if you need to you can change that to your ftp site name. Use the username and password you use when you FTP modules up to your site.

Fill Out Form and Hit Install

Once everything is set up click the Install button and you should see it download the module and add it install it to your server. Now all you need to do is go back to the modules list page and enabled it.
Step 4) Bonus: Resolve Dependencies

A great bonus feature of Plugin Manager is that when you download a module that depends on another one it will show in the Resolve Dependencies section under the plug-in manager (http://yoursite.com/admin/plugin_manager/deps). You can go to this page and automatically download any of the dependant modules. Super slick and easy.

Category: 

How I transfered my domain from GoDaddy to namecheap.com

I've always used GoDaddy for my domain registration. However, I find it really annoying that they make me jump through a bunch of hoops every time a register a site. I hate having to click no thanks to all their extra "features" they want to sell me. I'm also pretty annoyed with the way they run their advertisements.

For this site I registered the domain with namecheap.com after a friend recommended it to me. I really did find it a wonderful experience and I love how fast and how many features they give me free of charge. Because of this great experience, I decided to transfer my other domains over. It was a bit of a process, but I am documenting it here:

First I initiated the transfer request at name cheap (this was easy as they want my business). After a few minutes name cheap sent me an email asking for my sites EPP (Extensible Provisioning Protocol) code from my old registrar. The problem is GoDaddy doesn't easily tell you how to get your EPP code. However, the solution is quite simple once you know where to go. Here's what you do. Login to GoDaddy. Go into the domain management section and select your domain. Then you will see down in the bottom left corner of the screen a line that says Authorization Code: Send By Email. Click the Send by Email link and follow the onscreen prompts. Then GoDaddy will send you your EPP code to the email address you have registered as your Technical Contact for your domain. Next I cut and pasted that EPP code into the namecheap.com domain transfer status screen.

This is also a good time to make sure that your domain is unlocked at GoDaddy. When your domain is locked GoDaddy has a good excuse to not let the transfer to go through.

After submitting the EPP code to namecheap I got an email confirming the transfer. This took a few hours before I got the email (I think sometimes it can take up to a couple days). The notice told me that a domain transfer was requested and asking me to click a link to approve it. I still never got a notice from GoDaddy. Once I confirmed the transfer to namecheap I finally got an email from GoDaddy.

The GoDaddy email told me to reconsider and gave directions on how to cancel the transfer. It also said if I didn't cancel the transfer it would go through in three days. However, what it doesn't tell you is that you can also force the approval through GoDaddy's control panel and cause the transfer to go through faster.
How to force GoDaddy to transfer your domain

To do this, log in to your GoDaddy account.
Click on the Domains tab and select Pending Transfers. You should see your site listed.
Select the check box next to your site and click the Accept/Decline button a the top toolbar.
Choose accept and click the OK button.
Now your transfer will continue without waiting the three days!

Category: 

Better SEO Using The Page Title Module

Anyone who has been doing Search Engine Optimization (SEO) for a very long knows that what you title your web pages is very important. To get a little technical, since there can be some confusion, when I refer to Page Titles I mean what is between the and tags in the heading portion of a web page. This is the title that shows at the top of your web browser when visiting a page.

Example Title in Browser

In the example above you will notice that the title says: “Module Articles | Run Drupal.” The keen observer will also notice that this is simply one of my tagging terms I use. By default Drupal would normally have simply titled this page “Module | Run Drupal.” Not the end of the world but obviously adding the word articles makes this easier for people to know what this is section is all about. Along with this it also makes my page more search engine friendly if people are searching for something with the word article in it.

This is a very rudimentary example of one of the benefits of the Page Title Module. I will show you how it is done in this Drupal tutorial. Further I will show you how you can override virtually any page title you want. This is very beneficial when you want to have your Heading title that shows in the content section of your page different from the Page Title (). Ok, on with the tutorial:
Step 1) Download and Install the Module

The first step is to go download the Page Title module and install it. If you don’t know how to do this please go read my How To Install A Drupal Module Tutorial and then come back. It will make your life a lot easier.
Step 2) Set up Page Title Module Settings

Once its installed you will be able to get to the Page Title Module settings by navigation to the Administration, Content Management, Page Titles menu (www.your-drupal-site/admin/content/page_title).

Navigate to the Page titles administration area

Once you navigate to this page you should see a screen similar to the one below. Don’t be overwhelmed we will walk through each setting.

Page Titles Settings
Default Page Type Setting:

Basically this is the catch-all. If none of the other page type settings handle a page it will fall back to this one. The Page Titles module is so considerate and puts in a default for us. This default is the normal way that Drupal handles page titles. How convenient.
Frontpage Type Setting:

Another convenience that Page Title gives you. You can literally make your main homepage be any title that you want now! No more hacking theme files or any other crazy tricks. Say exactly what you want to say.
User Profiles Page Type Setting:

As viewers register themselves as a user at your site they get a profile page. This can be very basic or quite complex depending on how you set it up. Again you can set up the page titles to be whatever you want – keep in mind that you can use Tokens (discussed below).
Content Type – * Settings:

Each content type can have its own settings defined. For example maybe you want to append A Story about into the title for all of your stories. You could put this in the pattern text field: A Story About [page-title]. Now when you create a new story and call it something like: How I Found My Lost Keys. The page titles module would automatically make this into: A Story About How I Found My Lost Keys.
Other Page Type Settings:

Depending on what other modules you have installed and how you have things set up you will see options to setup title patterns for many different things. For example I have a category set up to define keywords for my posts. I changed its pattern to be: [cat] Articles | [site-name]. This is how my Module Articles | Run Drupal happens.

Example Taxonomy Pattern
Step 3) Learn How To Use Tokens

To unleash the true power of the Page Titles module you need to begin to learn how to use tokens effectively. The Tokens Module is used by Page Titles and many other modules in order to allow you to easily substitute things from nodes, categories, your site, etc. They dynamically get replaced by the corresponding value depending on the situation. If you go to the bottom of the Page Titles settings page you will see an expander labeled Available Token List.

Avalable Tokens List

Spend time reading through these and discover all the power you have. If you don’t understand what one of them is no problem just use it in a title. Create a dummy page and see what its title becomes.
Step 4) The Manual Backup Plan

No matter how effective you are at using Tokens and creating great Title Patterns, there will be times where you simply want to set the page title by hand. You can give yourself this possibility by checking the Show Field check box on the right side of the screen for any content types that you want this ability on.

Use the Show Field check box

By doing this you will see an extra field when creating on of the specified types. For example below is a screenshot of what I see when I create a new page. Notice that I have both a Title and Page title field now.

Sample create page

The Title is what will show up in the content of your post (usually in tags). The page title is what will show up in the tags and the browsers toolbar. Take note that if you leave the Page title blank things will simply fall back to what is setup for that content type. So you only need to use this field when you want to do something out of the ordinary.
Summary

Page Titles is a very simple module that handles almost all the unique situations that an SEO expert will want to implement. The interface is very easy once you get used to it and you will find the time you spend learning Tokens to be very valuable as many other Search Engine Optimization modules use these. Good luck as you put all this into practice please feel free to comment below on how things are going.

Category: 

Drupal SEO (Is it any good)

Back when I was first starting to look at different Content Management Systems (CMS) one of the reasons I decided to go with Drupal was because I heard from different people that it was much more Search Engine Friendly (SEF) when compared to the other CMS’s out there. This excited me not because I was an SEO expert but precisely the opposite – because I knew SEO was valuable but didn’t know what it meant to optimize my sites.

Since then I have learned much more about Search Engine optimization and I have come to two conclusions:

First: Durpal out of the box is pretty stinking Search Engine Friendly. I truly believe that if all you did was setup a default Drupal install with clean urls and began writing content that matters to people you will be indexed by all the major search engines and you have great potential to have good rankings in them.
Second: Drupal allows advanced SEO “experts” to thrive. As you learn more about SEO and you want to fine tune things there are many great modules out there that help make it possible for you to easily implement these search engine “tricks”.

I would argue that as far as I can tell Drupal is one of the best CMS’s for SEO – maybe even THE best one. I launched a Visual Basic Help site a few years ago and this is the graph of how my page visits/day has grown over the months and years. This is straight from my Google analytics.

image

As you can see up and two the right just like every web developer wants to see. Currently it gets about 400,000 page views a month (that’s over 13,000 page views a day). About 85% of this is from search engines. All this to say that from my experience Drupal is a great CMS for those looking to optimize their sites so they rank well in search engines.

How about you? Do you use Drupal and/or some other CMS? What has your results been as you implement SEO tactics on your site?

Category: