How to Install Moodle: 3 Methods

How to Install Moodle: 3 Methods

Moodle is one of the most popular learning management systems (LMS), with more than 272 million users worldwide.

It provides a personalized online learning experience and relevant services, all integrated into a single system for its users – mostly school administrators, educators, and students.

If the prospect of installing Moodle on a web server sounds challenging, don’t worry. We’ll explain three different ways to install Moodle: automatically, manually, and locally, all suitable for IT professionals and beginners.

Let’s begin.

How to Install Moodle Automatically

For an automatic installation, users can utilize the installer included in the control panel used by their web hosting provider.

We’ll walk you through the steps of this LMS installation on your web server using hPanel and cPanel.

Moodle Installation Guide: hPanel

With Hostinger, you can install the Moodle platform with ease using the already provided one-click installer.

To use hPanel’s one-click installer for Moodle, follow these steps:

  1. Log in to the hPanel.
  2. Click Hosting on the navigation bar, find your domain name, and click the Manage button.
  1. Scroll down to the Website section and click on Auto Installer.
  1. When choosing the CMS to install, click the Select button for Other.
Selecting Other when choosing the CMS to install
  1. Select Moodle LMS from the drop-down menu and click Select.
  1. After filling in the required fields, click Install.
The required fields to install Moodle

When the installation process is complete, Moodle will appear under the List of Installed Applications.

To visit your Moodle site, simply click on the URL provided and log in to the site administration page using your admin username and password.

Moodle Installation Guide: cPanel

If your web hosting provider uses cPanel, you can install Moodle automatically using the Softaculous installer. To do so, follow these steps:

  1. Log in to your cPanel.
  2. Find the SOFTACULOUS APPS INSTALLER section on the home page and click on Softaculous Apps Installer.
  3. Look up Moodle via the Search box on the installer page. Click Install.
  4. Fill in the required fields on the installation page. Once finished, click Install.

How to Install Moodle Manually

If your web hosting provider doesn’t have an auto-installer for Moodle, follow this step-by-step guide on installing it manually.

1. Prepare for the Moodle Installation

Before proceeding with the manual installation process, don’t forget to take care of these aspects:

  1. Download the latest Moodle package from its official website.
  2. Upload the file to your website using the File Manager or an FTP client like FileZilla. In this tutorial, we’ll use the File Manager. Log in hPanel, click Hosting from the navigation bar, find your domain name, and click Manage.
  3. On the Hosting Account page, scroll down to the Files section and click File Manager.
  4. Click on public_html -> Upload Files icon from the menu bar.
The upload files icon in the public_html folder

Important: Please note that the choice of upload location will matter. For example, if you wish to install Moodle on your main domain name (www.yourdomain.com), you will need to upload the files directly to your public_html folder.

  1. Click Select Files, select the Moodle installation package you downloaded, and click the Upload button.
  2. Right-click on the uploaded Moodle file and select Extract. Enter the folder name for the extraction and click the Extract button.
Extracting the uploaded Moodle file
  1. Create the MySQL database for your Moodle site. Return to hPanel’s Hosting Account, scroll down to the Databases section, and click MySQL Databases.
  2. Fill in the database name, username, and password. Copy the information for later and click Create.
Creating a new MySQL database
  1. Return to the File Manager, click public_html and locate config-dist.php. Create a copy of the file and edit the database information. Make sure to include the string of numbers in front of your database name and username.
Editing the database information

2. Install Moodle

Now that you’ve uploaded all the files on a MySQL database server, let’s install Moodle.

  1. Access the URL of the Moodle files in your domain. If they are located in the public_html folder, access it as it is: www.yourdomain.com. If they are installed on a subfolder named moodle, for example, type: www.yourdomain.com/moodle.
  2. Select a language and click Next.
  3. Make sure the correct Web address and Moodle directory are displayed. Leave the Data directory as it is, or change the location.
Checking Moodle installation details: web address, Moodle directory and data directory
  1. Return to your File Manager and open the copy of config-dist.php you’ve made earlier. Scroll down to find Web Site Location and Data Files Location. Edit the wwwroot and dataroot values with your Web address and the Moodle Data directory.
Editing the wwwroot and dataroot values with your Web address and the Moodle Data directory
  1. Save and Rename the file to config.php. Return to the Moodle setup page and select Next.
  2. Select either Improved MySQL or MariaDB as your database type. For this tutorial, we’ll use the second option.
  1. Enter the information of your MySQL database that was previously created in the required fields and click Next.
  2. If the configuration file is set correctly, a copyright agreement will appear. Click Continue. The installation will start by checking if all the required settings such as storage capacity are available and enabled properly on your hosting.
Continuing the Moodle installation process by confirming that you have read the copyright notice
  1. Click Continue during the checks until you arrive at the administrator setup page. Fill in the required information and click Update Profile.
Updating profile to proceed with the Moodle installation
  1. Add the Front Page information, where you set the full name of your Moodle site, the summary, timezone, and disable or enable user self-registration.
Proceeding to install Moodle by adding front page settings

The installation process is now complete. Continue to make necessary changes in the admin area to get your Moodle site up and running.

How to Install Moodle on Localhost

Installing Moodle on localhost is useful for trying out its interface and features before performing production installations.

To install the Moodle platform on localhost, follow the instructions below:

1. Check the Moodle System Requirements

Go to the official Moodle site and click on Downloads on the navigation bar. Find the latest version of Moodle, choose your preferred file format, and click on the corresponding download button.

In this tutorial, we’ll download Moodle 3.10.3+ in .zip format.

Checking latest Moodle release to download

You also need software stacks such as XAMPP or WAMP. In this tutorial, we’ll use XAMPP.

2. Use XAMPP

Access the Apache Friends website and click on the XAMPP download link that corresponds to your operating system. Click on Click here for other versions to download other versions of XAMPP.

XAMPP homepage

Make sure the XAMPP version you choose to download is compatible with the version of Moodle you downloaded.

For example, Moodle 3.10.3+ is not compatible with PHP 8.0.3 since it requires PHP 7.2. Download the XAMPP version that meets this requirement, such as XAMPP 7.3.27.

Latest XAMPP versions to download

Launch XAMPP to access the XAMPP control panel. Click Start for both Apache and MySQL.

Clicking Start for both Apache and MySQL in the XAMPP control panel

Once done, the control panel should look like this:

The XAMPP control panel

3. Create a Database

If you are using the version of Moodle that comes after Moodle 3.x, creating a database is no longer mandatory.

However, you can still create an empty database to sync when Moodle requests database information during the installation process.

In this tutorial, we’ll access phpMyAdmin via XAMPP.

Type localhost/phpmyadmin/ into your web browser’s address bar. Click New from the left sidebar menu.

Clicking New from the left sidebar menu on phpMyAdmin

Fill in the Database name field and leave everything else as it is. Click Create to finish the database creation process. The database you have created should appear on the left sidebar menu.

Databases on phpMyAdmin

4. Extract the Moodle Files

Find the Moodle .zip file you downloaded on your computer. Right-click on the .zip file, find the option to extract the files, and select the XAMPP’s htdocs folder as the destination for the extraction.

Selecting a destination to extract Moodle files

When the extraction process is complete, you will see that a folder named moodle has been created in XAMPP’s htdocs folder. This folder contains all of Moodle’s files.

5. Proceed With the Moodle Installation

After preparing all the necessary components, follow these steps to begin the installation:

  1. Type localhost/moodle/ into the web browser’s address bar and wait until the installation page appears. Choose your preferred language and click Next.
  2. On the Paths page, type in the Moodle data directory you want in the Data directory field or leave it as it is. The values in the Web address and Moodle directory fields are not modifiable. Click Next when you are done.
The Moodle installation details: web address, Moodle directory and data directory
  1. Select MariaDB from the drop-down menu and click Next.
  2. Fill in the Database user field with root. Write the MySQL port number on the XAMPP control panel in the Database port field. Leave the Database password field blank for local installation, but you must set a password for production installations. Click Next.
Filling in the database details
  1. Read the copyright notice and click the Continue button to proceed to the server check.
  2. During the server check, you may run into an error message asking you to enable Intl PHP Extension, such as the screenshot below.
Report to enable Intl PHP Extension to install Moodle
  1. To enable Intl PHP Extension, find the php.ini file in the XAMPP folder on your computer. Using a plain text editor, scroll down and add the following command line to the file: extension=php_intl.dll
Enabling Intl PHP extension
  1. Find the intl.default_locale and intl.error_level directives in the php.ini file and enter the following values:
[intl]
intl.default_locale = en_utf8
intl.error_level = E_WARNING
Adding the values to the php.ini file
  1. Locate extension=intl, extension=openssl, extension=soap, and extension=xmlrpc in the php.ini file. Make sure there are no semicolons coming before them. If they are, simply delete them. Afterward, save changes and close the plain text editor.
Locating extensions in the php.ini file
  1. Go to the XAMPP control panel and restart Apache. Press the Stop button beside Apache. When it turns to a Start button, press it again.
Restarting Apache on the XAMPP control panel
  1. Return to the installation page, scroll down and click Reload.
Returning to the Moodle installation page and clicking the reload button
  1. If the error is fixed, the error message should disappear. The Continue button should appear at the bottom of the page. Click on it to proceed to the installation page.
Your server environment meets all minimum requirements
  1. The installation should start automatically. After the process is complete, click the Continue button at the bottom of the page.
Clicking continue after the successful Moodle installation
  1. After creating your main admin account by filling in the required fields, click the Update profile button.
  2. Configure the Front page settings, such as the site name, front page summary, location settings, authentication system, and outgoing mail configuration.

Conclusion

Moodle is a learning management system that offers its users – from students to educators – services related to online teaching and learning.

There are three different ways to install the Moodle platform on your web server: automatically, manually, and locally.

While none of the three methods require IT experience, the easiest way to install Moodle is still via automatic installation using a one-click Moodle installer, such as Hostinger’s hPanel.

If your web hosting provider doesn’t provide a one-click Moodle installer, you can opt for the manual installation method. Alternatively, install Moodle on localhost and try out its features in a local environment.

We’ve provided three easy and user-friendly ways to install the Moodle platform. With all of that information in mind, we wish you good luck in your education journey.

In case you have more questions, drop a comment below or contact your web host’s support team.

Author
The author

Tomas A.

Tomas is a senior customer support agent at Hostinger. Besides providing top-notch technical advice on a daily basis, he likes to create websites and do various coding side projects.

Author
The Co-author

Tashia Tamara

Tashia is a Digital Content Writer at Hostinger. She is passionate about website development and digital marketing and strives to support people in their eCommerce journeys by spreading her IT knowledge. During her free time, she likes to travel to other worlds through movies and works of literature.