How to Install Moodle: A Comprehensive Beginner’s Guide

How to Install Moodle: A Comprehensive Beginner’s Guide

Moodle is a free and open-source learning management system. Whether you are an educator or a student in a university or school, this platform is a must-have for your online learning project. If you want to know how to install Moodle on your hosting, this tutorial is just for you!

How to Install Moodle Automatically?

Hostinger gives you the option to install Moodle instantly by using its one-click installer. Here’s how:

  1. Log in to the hPanel, look up the Auto Installer in the search field.
  2. Once in, locate the Moodle installer and click on it.
  3. Fill in the required fields and hit Install.
    hPanel's Moodle one-cllick installer

That’s it! After the installation process is complete, you will see Moodle under the List of Installed Applications. To visit your Moodle website, simply click on the URL provided and log in using your admin username and password.

How to Install Moodle Manually?

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

Preparing the Moodle Installation

Before we can proceed with the manual installation process, we have to take care of a few things:

  1. First of all, you need to download the Moodle installation package from its official website.
  2. Then, upload the file to your website using either the File Manager in your control panel or an FTP client like FileZilla.

    Important: Please note that the upload location matters. For example, if you wish to install Moodle on your main domain name (, you will need to upload the files directly to your public_html folder.

  3. The last thing you need to prepare is the MySQL database for your Moodle website. To create one on hPanel, you just need to access the MySQL Databases section. After filling in the database name, username, and password copy the information for later and click Create.
  4. Go to File Manager -> 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!
    Moodle database information the in config-dist.php

That’s pretty much it for the preparation stage! Now, let’s get down to business.

Installing Moodle

Now that you’ve uploaded all the files and created a MySQL database let’s go ahead and install Moodle.

  1. Access the URL of the Moodle files in your domain. For example, if they are located in the public_html folder, you just need to access it as is (, and it will take you straight to the setup page. If they are installed on a subfolder named moodle, for example, it can be accessed like so: Select a language and click Next.
  2. Make sure that the correct Web address (domain name) and Moodle directory (installation file location) are displayed. You can leave the Data directory as it is, or change the location.
    Second step of the manual Moodle installation process
  1. Before we move on, go back 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 Data directory.  Then, Save and Rename the file to config.php. You may now select Next on the setup page. We can move to the next step to install Moodle.
    Configuring the wwwroot and dataroot lines for Moodle via file manager
  2. Select either Improved MySQL or MariaDB as your database type. For this tutorial, we’ll use the second option.
  3. Once again, enter the information of your MySQL database that was previously created and click Next.
  4. If the configuration file is set correctly, you will see a copyright agreement. Click Continue and the Moodle installation will start checking if all the required settings and configurations are available and enabled properly on your hosting.
  5. Click Continue during the checks until you arrive at the administrator setup page. Fill in the required information and click Update Profile.
  6. Almost there! Now you just need to add the Front Page information, where you can set your website’s full name, summary, timezone, as well as disable or enable user self-registration (whether their accounts are activated via email or by Administrator approval).

Congratulations, you now know how to install Moodle on your website! Now you can continue to make necessary changes in the admin area to get your site up and running.


Moodle is a great platform for educators and students to communicate and set up learning environments, and by finishing this tutorial, you learned how to install Moodle automatically and manually.

We hope this guide was helpful for building your next online learning platform! Leave us a comment to share any questions or thoughts regarding this tutorial.

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.