Posts Tagged ‘Drupal’

Here I will point out some things that should be done by yourself after you have installed Drupal. It’s a basic Drupal site configuration – some things that I always do when I create new Drupal website.

I assume you have installed Drupal on your web server. Installation is very easy, it’s a matter of “point and click”. Just make sure you create your database before that. More info on Drupal installation can be found in install.txt file that comes with Drupal installation.

So, you’ve just installed Drupal on your web-server (or your localhost), and now you ask yourself: “Hmmmm….. Now what?”. Of course, it depends on the nature of your future website what you want to do with it, but before all that there’s some basic Drupal site configuration that I always do, and I suggest you do it as well.

You are presented with a nice blue theme and a welcome message “Welcome to your new Drupal website!” and some additional info on setting up your Drupal website. I suggest you read that text and then do the following:

1. Go on and create your first account by clicking “create the first account.” link. That first account that you create will be the admin account for your drupal website! It will have a user id of 1. You can name it “admin” or whatever you like.

2. After that you are back to frontpage of your installation. Go to your admin section, and click on “Modules”. On modules listing page, mark checkboxes for the following modules: Contact, Path, Search and Statistics. Click “Save configuration”. This will install some additional core modules that are not enabled by default, but I always use them.

3. Enable Clean URLs by visiting admin -> Site configuration -> Clean URLs (you need to have mod_rewrite Apache module enabled for this to work).

4. Go to admin section. If you see a message at the top that says “One or more problems were detected with your Drupal installation. Check the status report for more information.”, don’t worry about it, we’ll fix that in a minute. Click “Site information” and fill in all those fields for your Drupal website. I think they are all pretty much self-explanatory :-)

5. Next, click “File system” in admin section. You will hopefully get a message that “Files” directory was created. Click “Save configuration”.

6. Now we need to setup Cron for out Drupal installation. In case you didn’t know, cron is a unix process that works in a background all the time and it can execute certain commands for you at any time you tell it to do so. Drupal NEEDS cron job to be set up in order to function properly. So, login to your VPS (or dedicated server) and type following command:

crontab -e

This opens up your cron edit screen. Add the following line to it:

0 9 * * * wget -q http://www.your-domain.com/cron.php

This tells your cron to execute cron.php script at exactly 9am every day. You should be fine with it, although you can choose whatever time of the day you want.

(in case you don’t have shell access, and you are on shared hosting, you should have some kind of setting up a cron. I know that in Cpanel you can set up a cronjob very easy, through graphical user interface. If you cannot do that, I suggest you contact you hoisting provider for assistance about setting up your cronjob for Drupal).

7. Ctrl+X and ‘Y’ and Enter. You should be out of your cron settings program. You can check if you successfully added cronjob by executing
crontab -l

8. Now go back to your browser, to your admin page of Drupal installation. You can run cron manually now, and then you shouldn’t do it anymore, since we’ve just set up a cronjob for Drupal. Now you shouldn’t receive any error messages at the top of the window in admin section.

9. Go to front page of your Drupal website. You are going to create your first piece of content in Drupal.

Create content – > Story

Create it! Be creative ;) Write something just for fun, as we have a little bit more to configure. After you click Submit, your “story will be created. Congratulations, you’ve just created your first piece of content (node) in Drupal.

10. Go to your webroot directory where your Drupal installation is. Open up your .htaccess file and add following lines to it:

RewriteCond %{HTTP_HOST} ^your-domain.com$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

or, if you have ‘www’ part in your domain name, add this instead:

RewriteCond %{HTTP_HOST} ^(www.)?your-domain\.com$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

Save “.htaccess” file.

What this does is that it gets rid of a trailing slash at the end of your Drupal URLs. So, if you type URL with a slash at the end, it will automatically get rid of it. This is extremely important for search engines like Google and your website ranking, that’s why we do this.

You should now have a basic Drupal website up and running with minimal number of modules running.

I suggest you now play around your Drupal website, explore the admin section a little bit more, just to see that it’s nothing really difficult there. Any questions or suggestions, I’d be happy to read them.

Maybe you’ve heard about Drupal somewhere, maybe a friend told you about it, or maybe you just saw some cool website and found out it has been made with Drupal.

Drupal is CMS – Content Management System. It means you somehow “manage content” with it. So, what kind of content can you manage with Drupal? Any kind!

You see, every piece of content in Drupal is called a node. Node is the smallest chunk of information in Drupal, if you want to call it like that. Node is actually this article that you are reading right now.

Nodes can be of different types. That’s where “content types” come in the game. Drupal comes with some pre-defined content types like “story” and “page” content types. The good thing about content types is that you can define your own content types and also you can extend them (more about that later).

The important thing to understand is that most of the content in Drupal is made up of nodes. Nodes can have comments, and comments can be submitted by users.

What can You create with Drupal?

With Drupal you can create:

* Simple n-number-of-pages static website
* Simple personal homepage
* Company website
* Weblog
* Dating website
* Myspace-like website
* (insert your favorite type of website here)

Basically, there are no limits with Drupal, and you really can make any type of website you want.

Of course, it all comes to you and your skills. It helps a lot if you know some html, php, css and that kind of stuff. It is not necessary but it will help.

Why you should use Drupal?

* Easy to use (even if you don’t know html, php…)
* Lots of modules
* Lots of themes
* Great established user community
* You can make a website in terms of hours, even minutes

Hosting your Drupal site

If you are serious about your Drupal projects, then I suggest you go with a standalone IP address. Therefore, choose either VPS (virtual private server) or a dedicated server (if you can afford it).

DO NOT even think about having big Drupal website on shared hosting. Drupal is hard on system resources, both CPU and RAM, so my friendly advice to you is to avoid shared hosting. I am telling you this from my personal experience. One community website that I have made (which I will tell you about in later postings) was initially on shared hosting. It was my first Drupal project, and I didn’t know much about Drupal, I just learned how to this and that in Drupal, not paying attention to Drupal usage of system resources.

Then one day I got an email of warning from my hosting provider that my website is causing problems with CPU and RAM usage, therefore other websites on shared hosting were not working. That was the moment when I realized I have to move to a VPS.

The only case where I could imagine running Drupal on a shared hosting if you are going to run a small website with mostly static content, then it is fine.

With that in mind, I hope you now have a basic understanding of what Drupal is and what Drupal can do for you.