Thursday, October 28, 2010

Tutorial: Setup a Website on Localhost With Joomla and WAMP for Windows OS



For web development process, it's easy if you run your site on your local machine first before launch it on the web. This section shows you a simple guidance on how to setup a successful website on your localhost using Joomla! which is one of the most powerful Open Source Content Management Systems (CMS) on the planet.


Introduction

Never make a mistake of thinking your hobby website is just a website. It will bring you satisfaction that few other endeavors can bring. In fact, it will be more successful than most commercial websites. These are the reasons why:

    1. Passion creates extraordinary content
    2. Extraordinary content attracts attention
    3. Passion and extraordinary content opens minds and hearts
    4. Open minds and hearts brings you tremendous benefits


1. A server

The first step is to setup a server. To setting up the server, you will need to install Apache, PHP, and MySQL (for the database) on your computer. You can install these components separately, or simply install the WAMP server on your computer. You can get the latest version from the Wampserver website. The installation process is very simple. Double click on the downloaded file and just follow the instructions given. Everything is automatic.

By default, your installation doesn't requires you to set any password. After the installation was successful, you can view your site on your browser. Simply view http://localhost/ on your browser.

More information about WAMP can be found on the Wampserver website.


2. Download The Content Management System - Joomla!

This step is not mandatory to create a website because after you successfully setting up a server, you already can run any web scripts on your localhost. But, it will give you a nightmare if you dare to create a complicated site like portal or blog from scratch. Therefore, you need a Content Management System (CMS). This is why we need Joomla!. You can download the latest stable version from the Joomla! website. At this time, we are using the version 1.5.21. For more information about Joomla!, please visit joomla.org.

Now, how to install Joomla! on your server? Follow the next step.


3. Extracting the Joomla! files

The next step is extracting your Joomla! files on your root directory. From your WAMP trayicon, click on 'www directory' label. This will open your 'www' folder which is where your Joomla! files should be placed on. Inside this folder, you will noticed one file named index.php file. This file will be executed when you view your site on a browser. Create a new folder on this directory. In this section, we name it 'joomla'. Now, extract the Joomla! files on this 'joomla' directory.

You also can change your root directory path to other locations. You can do this by editing httpd.conf file. Open the tray -> Apache -> httpd.conf. You will niticed these two lines:

DocumentRoot "c:/wamp/www/"
<directory "c:/wamp/www/">

Edit them to your desired path. Then restart the server.


4. Creating a Database for the Joomla!

Firstly, make sure your WAMP server is running. Then, open the trayicon and point to phpMyAdmin. Click on it to open on your browser. Now it's time to create a database for your Joomla!. This is easy. Choose your desired databese name, put it on the box labelled 'Create new database' then press 'Create' button. Now your database has been created. Remember, you will need to use this database name to install your Joomla!.


5. Installing the Joomla!

Now, open http://localhost/ on your browser. Then, point to your Joomla project folder. You will be redirected to Joomla! installation page.

1 : Language
The first step is choosing the language and click next.

2 : Pre-installation Check
This step is pretty straight forward. You just need to make sure all the required parameters are highlighted in green. The 'Recommended Settings' below it is optional. Then proceed to the next step.

3 : License
Understand the license then click next for the next step.

4 : Database
This is the step for the MySQL database configuration. Simply follow these:

    Host Name: localhost
    MySQL User Name: root
    MySQL Password: 'leave blank'
    MySQL Database Name: 'the database name you have created on the step 4 (Creating a Database for the Joomla!) above'

Now you can click 'Next'.

5 : FTP Configuration
This is not necessary since we're running on Windows OS. Just proceed on the next step.

6 : Configuration
Put your desired site name, admin e-mail and password. Be sure to remember the password you have entered. But you can still change these later in the site global configuration. You can choose whether you want to install the sample data or not. For the first installation, it's strongly suggested that you install the sample data first, and continue the development from there. You may now proceed to the final step.

7 : Finish
The final step. Just delete the installation folder on your Joomla! directory. You are done!
Now you can view your site on your browser.



6. Managing your site

By default, your Joomla! site has the default template installed for you. You always can change the template to your desired template to suit your site needs. This is one of the exciting things about this system. You can change and manage your site with unlimited possibilities. Not only the beautiful and professional templates, but they have their own components, plugins, modules, and other extra elements that you can play around. Please visit the Joomla! site and you will find a lot of great stuffs from there.

No comments: