Location : Web Hosting - Web Hosting Knowledge Base - Moodle CMS Tutorial

Moodle Installation

Installing Moodle in a Cpanel hosting account is not very complicated and only involves several steps, we have prepare a step by step manual installation guide here to help you through the installation process in your website hosting account. If in any case you need help on the installation, please feel free to drop a note to helpdesk.

Setup MySQL database in hosting account

First thing to do is to prepare your hosting account with the necessary setup, which is to setup a MySQL database your hosting account, a mysql database is required for the moodle installation process to create necessary tables and storing initial data for setting up moodle, and the mysql database will be used for storing your moodle application data in future when you start adding data to it.

Download Moodle, extract and modify database configuration settings

After following the instruction to setup the MySQL database, a MySQL user and granted access for the MySQL user to the database, you are ready to prepare Moodle for the installation. If you are familiar with SSH access and working in the shell prompt with Linux shell commands, you can follow steps below to quickly get the moodle files ready for installation, else you can follow the conventional method, which is using an FTP client, a compress / uncompress tool installed in your computer to get the Moodle files ready.

Preparing Moodle files using SSH

SSH login to your Cpanel hosting account shell prompt, grep the latest moodle stable version from the moodle download site (download.moodle.org) and then extract the archive file in your hosting account below are the command to enter in your hosting account shell prompt :-

wget path_to_moodle_archive_file.tgz
tar -xvzf moodle_archive_file.tgz

The files will be extracted into a folder named moodle, depending on how you wish to access your moodle website, you can place the entire folder into public_html if you want to access moodle by entering http://yourdomain.com/moodle/ or move the files and folders within the extracted moodle folder in public_html if you want to access moodle by entering http://yourdomain.com.

Preparing Moodle files using FTP Client

Getting moodle files ready through FTP is quite simple, goto Moodle download site (download.moodle.org), grep the URL (.zip format) of the moodle latest stable version, paste it to your FTP client to download to your computer, or a much shorter way is to right-click on the .zip URL in moodle download site and click save as and place it to a folder in your computer. After download, extract the archive file with an uncompress tool, then open up your FTP client and upload all the files to the appropriate folder in your your hosting account.

Execute moodle installation script in browser

After moodle files are uploaded and ready in your hosting account, you can proceed on to execute the moodle installation script by issuing :-


depending on where you have place the moodle files.

Moodle installation script will try to create the config.php configuration file, it will try to save this file to the moodle folder, but may require you to save it an manually upload to the hosting account if it fails to save the file. Read and follow the instructions on screen as you go through each step in the installation process and enter the appropriate info, you will require the MySQL database name, mysql user / password info from the mysql database creation earlier in this installation process.

After getting the config.php file done and placed in the proper folder in your hosting account, you can access your moodle website by entering http://yourdomain.com/ or http://yourdomain.com/moodlepath/,then access the admin page to continue with the reset of the moodle installation, when you access the admin page for the first time, you will be asked to go through a GPL "shrink wrap" agreement and you must agree to continue with the setup. After agreeing the agreement, moodle will continue to create the database tables and request some extra configuration (default language, SMTP hosts etc.) from you, enter the info as required and hit Save changes, hit Continue and fill up other configuration parameters such as name, format, description etc., fill up and then hit Save Changes. Final step of the installation process with request you to create a root user for accessing this admin page, enter as required and click Save Changes.

You are 95% done in the installation process, there are process of setting up cron and backup for the moodle site, and info on create now courses etc. There is a very detail and informative moodle installation note that you can refer to at the moodle installation guide (docs.moodle.org/en/Installing_Moodle)