- Internet & the Web»
- Web Page & Web Site Development
Creating a website in Drupal 7 without knowing anything about programming
This article is mostly meant for beginners and since that, it includes setting up localhost in your computer, in case you do not have web hosting, but still want to create a website at your own computer.
For those, who do not know, localhost is basically local web-hosting. That means that you can set up a website in your computer without it being online - your computer is hosting it locally. Afterwards, you can copy it to some other host, if you want. Localhost can be set up in every computer.
Setting up localhost
To set up the localhost and be able to view the website on browser, you'll have to install WAMP, if you use Windows, and LAMP, if you use Linux. These are the necessary programs to enable that: Apache2, MySQL and PHP (AMP).
Since you do not have the website yet, there are no files to copy to the www/ folder in the tutorial. But if you type http://localhost on the browser, a default page (saying "It Works!") should appear.
- Installing LAMP - Open Applications->Accessories->Terminal. Follow these instructions (under the topic "To install the default LAMP stack ....").
- Setting up localhost: Open Terminal again and follow these instructions under Step 2 only.
Again, if you type http://localhost in browser, "It Works!" should appear. If you type in http://localhost/~YourUsername, you are in the directory, where your web-page is going to be. This shows the files from the directory home/public_html.
Installing Drupal 7
- Quick installation guide - this includes all the following steps, I am just adding some information.
- The fist step: Download Drupal 7 version - zip or tar.gz files. Extract the files into your home/public_html folder or into C:->wamp->www. Rename the folder from Drupal-X.X to MyWebsite or whatever you want your site name to be.
- Skip the setting up domain step - the next step for you is "Creating the configuration file and grant permissions" from the installation guide.
- Creating database for your Drupal website. Probably the easiest way is to do it with phpmyadmin. (If you do not have it, you will have to install it - in Ubuntu, open the terminal and type in: sudo apt-get install phpmyadmin; for Windows, download it from phpmyadmin website). After that, follow the instructions of the Drupal installation guide. For example create a new database "mysitename".
- Run the installation according to the installation guide. Note that Drupal has many translations available - during the installation, in the language part, there is a guide, how to install Drupal in different language than English.
- Go to your new website: open in browser http://localhost/mywebsite in Windows or http://localhost/~yourusername/mywebsite in Ubuntu (put your websites name instead of "mywebsite").
Now you should have a working website! If for some reason it does not work, leave a comment and I will try to look into it. For example, the first time I installed Drupal, I got error 500 - internal server error. It came out that the default .htaccess file (hidden file in Drupal root folder) did not suit for my settings.
Some of the basic features in Drupal 7
If you are logged in as administrator, you can see the admin panel in the up top of the website all the time. These are all the features for administrators. For example, if you want to create a user, click on "People" and then "New User". From there you can create a new user, set if the user is administrator etc.
- The appearance - probably you want to choose the appearance yourself and not leave the default appearance of Drupal. Changing the theme is simple - you will just have to find a suitable theme for your new website, download it and enable it. You can look at the Drupal 7 themes in drupal.org or just google Drupal 7 themes (or this site has some examples), download a theme you like and extract it to the directory sites/all/themes/ (in your website's folder). After that, go to your website (log in as administrator, if you have not yet) and click Appearance on the Admin panel. There you can see all the themes available and the one that you just downloaded should also be there, among the disabled themes - click on 'enable and set default'. After that, your website has new appearance!
- Creating new content - by default, there are two content types - the article and the basic page. Basic page is meant for pages like "About us", "Contact" and other pages that you want to put in main menu. Articles are meant for news, stories etc. For example, lets create an "About" page and put it into the main menu. First, click on the "Add content" link on the left, on admin panel. Choose the Basic page. The title is "About", content - you can write anything you want about the page. There is an additional menu at the bottom of the page - click on the "menu settings" and check the checkbox for Provide a menu link. Now you can choose the menu, its main menu by default already, so, save the page. Now, if you go to the front page of your site, you should see the About page in the menu.
- Moving and adding the website elements - There is a module in Drupal 7 by default called Blocks. Many of the elements on your pages are blocks - for example, the main menu is a block, the login and logout boxes are blocks etc. For example, in the website footer, there is a sign "Powered by Drupal" by default. Maybe you want it to be in the right sidebar or somewhere else instead. To do that, go to Structure -> Blocks from the Admin panel. There is a list of different regions of the website and under the regions all the blocks (elements of the website), which are in that region. Find the Powered by Drupal block, and choose Second Sidebar from the selection list next to it. Then save the change and go to your websites front page - the Powered by Drupal sign is now in the second sidebar. From the blocks page you can also add blocks and put them in the region you like.
Drupal has many possibilities, that you can use without writing a single line of code, no programming. It might be complicated at first to get used to Drupal, but once you get it - you can create websites with various functionality. Just like the themes for the website appearance, you can download modules for website functionality. For example, even forum can be downloaded and enabled, nothing more. I will probably write more about modules in some following article, but until then, you can try to get used to the blocks and content and just navigate around the admin panel possibilities.
If you have anything to add or ask or any things you would specifically like to add to your website, just let me know by writing a message or comment.