Moodle is one of the best open source (free) online learning management system. If you are planning to launch e-courses on your website, you can consider going with Moodle.

Here's step by step guide on how to install moodle.

Step 1: Download the Package

Download the latest Moodle software. There are two options for you here: Built weekly and latest official update. I recommend to download the zip (compressed) file latest official update as it is more stable.

Step 2: Create Sub-directory

If you are planning to install your Moodle software in different sub-directory (example.com/learning), create a sub-directory and upload the downloaded compressed file in step 1 to that sub-directory. You can use File Manager of cPanel or FTP client.

Step 3: Create Database and User

While your file is being uploaded, you can create a new database and the database user. Note the database name, username and password. During the installation routine, you will enter the name of the database, the database user, and the database user's password.

Step 4: Extract Files

Extract the the zip or compressed file in the sub-directory. This compressed file contains many small files and directories that constitute Moodle. In case a new folder "Moodle" is created copy its content to the required sub-directory.

Step 5A: Run the Web Installer Script

You are now ready to run the installation routine. Moodle's installer script walks you step by step through setting some of the configurations, and through the creation of Moodle's database tables. 

In the Moodle directory, a script called install.php creates the Moodle configuration file when the script is run. You run the script by just launching your browser and pointing it to wherever you've placed the Moodle software. The script creates config.php.

Go to the URL in your browser where you have extracted the files (example.com/learning). A web based installer will start. Moodle begins the install routine by asking you to select the language for the installation. After selecting the language that you want to use during the installation, click the Next button.

Step 5B: Confirm Paths

Next, the installation routine asks for the web address of your Moodle system and the names of the directories for the software and the data.

The Web address is the URL that browsers use to access Moodle. The Moodle directory is filled in for you. This is the directory on your server, to which you uploaded the software.

Check these values, and continue to the next step.

Step 5C: Database Settings

In this step, you specify the database that Moodle uses. The Database host is the address of the computer that serves the database. On most servers, the hostname will be localhost.

Fill in the Database name, Database user, and the Database password that you created in step 3. 

The Tables prefix will be added to the beginning of the name of every table that Moodle creates. If you use the same database for Moodle and something else, you can easily spot the tables used by Moodle from their prefix.

Step 5D: Start Installation

Moodle will show server checks and other checks. If everything is fine, just click Continue and your installation will begin. It will take some time and you need to scroll down a little to click Continue.

Step 6: Administrator User Account

The admin user has the ultimate power on your Moodle site. This user can do anything on the site, including creating other users.

Enter the login details of admin account: username, password, name, email; and click Update Profile.

Step 7: Front Page Setting

The full site name that you enter here is displayed on the front page. The short name is displayed in the navigation menu. The front page description is displayed on the front page of your site. You can easily change all of these settings later.

At the bottom of the page, you can choose whether to allow e-mail-based self-registration. It is turned off by default. Unless you need to allow people to register themselves, you should leave this turned off.

After you save the page, the install routine advances to the next step.

Step 8: Success

Your Moodle installation is complete and you will be directed to front page!

You can delete the uploaded zip file and "Moodle" directory that was created while extracting the files.

Configuration Settings: config.php

Configuration variables are settings that tell Moodle where the database is located, what the database is called, the database user and password, the web address of the Moodle system, and other necessary information. All of these configuration settings must be correct for Moodle to run. They are stored in a file called config.php in Moodle's home directory.