How to Install Moodle on Hosting Server?

As we forge into the 21st century, eLearning is increasing in popularity. Businesses and institutions are looking to Learning Management Systems (LMS) to make learning online more effective and accessible.

With 272 million users worldwide, Moodle offers teachers and administrators an intuitive platform to teach, evaluate, and provide students with a personalized learning experience. 

However, unless you’re a tech-wizard, installing third-party software to your website can be a daunting prospect. This article offers three step-by-step guides to help you install Moodle (automatically, manually, and locally) on your website.

Let’s dive in.

Table of Contents

  1. Automatically install Moodle Via Server Management Software.
  1. Manual Installation
  1. Installing Moodle on a LocalHost
  1. Optimizing Your Moodle Performance

Automatically install Moodle Via Server Management Software

Installing any software can be a tedious and complicated process, but with the invention of auto-installers, you can complete your installation quickly and without hassle. 

If your main focus is getting your LMS up and running as soon as possible, automatic installation is your best bet. Many hosting providers offer a control panel with their services. With the help of these platforms, users of all skill levels can easily install and operate third-party software.

SPanel & cPanel

There are tons of control panels available. Among the most popular are SPanel, cPanel, and hPanel. 

To install Moodle via your SPanel or cPanel:

  1. Log in to your SPanel/cPanel.
  2. Open the Softaculous apps installer.
  3. Type Moodle in the search box and click Install.
  4. Enter your information in the required fields on the installation page. 
  5. Click Install.

Manual Installation

If you don’t mind jumping through a few extra hoops, manual installation is ideal for those operating on a budget and wanting customizability.  We’ve broken the manual installation process into two phases.

Phase 1: Prepping Moodle for the installation

  1. Head to the official Moodle website and download the latest Moodle package.
  2. Log in to your control panel, locate your domain name, and click Manage. Upload the file to your website using File Manager
  3. To do that, head to Files and click File Manager.
  4. From the menu bar, select public_html Upload Files.
  5. Click Select Files, choose the Moodle installation package you downloaded, and hit Upload.
  6. Right-click the uploaded Moodle file and click Extract. Type in the folder name and press Extract again.
  7. Create the MySQL database for your Moodle site, head back to your control panel’s Hosting Account Databases, and open MySQL Databases.
  8. Enter the database name, username, and password. Be sure to copy the info (you’ll need it for later) and hit Create.
  9. Head back to File Managerpublic_htmlconfig-dist.php. Make a copy of the file, then edit the database information. Include the string of numbers in front of your database name and username.

Phase 2: Installing Moodle

  1. Access the Moodle files’ URL in your domain. You can do that by typing www.yourdomain.com if they’re in the public_html folder, or www.yourdomain.com/subfoldername if you put them in a subfolder.
  2. Choose a language and hit Next.
  3. Open the copy of config-dist.php through File Manager and find Web Site Location and Data Files Location. Change the wwwroot and dataroot values with your Web address and the Moodle Data directory.
  4. Rename the file to config.php and save it. 
  5. Head back to the Moodle setup page and click Next.
  6. Select Improved MySQL.
  7. Fill in the MySQL database information you previously entered into the required fields and press Next.
  8. Read and confirm the copyright notice, and press Continue to start the installation.
  9. Press Continue until you get to the administrator setup page, enter the required information, and hit Update Profile.
  10. Lastly, insert the Front Page information. This section includes info like the full name of your Moodle website, timezone, and summary. 

You’ve just installed Moodle on your website.

Installing Moodle on a LocalHost

Sometimes, testing your software is necessary before bringing it online. Similar to manual installation, the process is a bit longer, so we’ve broken it down into smaller steps.

To install Moodle on localhost, follow the guide below: 

Phase 1: Prepping the components

  1. Go to the official Moodle site and download the version that works with your operating system (be sure to check the Moodle System Requirements).
  2. For this process, you’ll need a software stack. Go to the Apache Friends website and download the XAMPP that corresponds to your operating system. Ensure that the XAMPP and Moodle versions that you download are compatible.
  3. Open the XAMPP control panel and start both Apache and MySQL.
  4. Create a Database by typing localhost/phpmyadmin/ into your browser address bar, open the left sidebar menu, and click New.
  5. Enter the Database name, leaving everything else as it is, and then click Create. You should see your newly-created database on the left sidebar menu.
  6. Locate the Moodle file you downloaded, right-click it to extract the file, and relocate it to the XAMPP’s htdocs folder.

Phase 2: Moodle Installation

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

  1. Type localhost/moodle/ into your browser address bar, select a language, and press Next.
  2. On the Paths page, enter your Moodle data directory into the Data directory field or leave it as it is (you can’t modify the Web address and Moodle directory fields). Hit Next.
  3. From the drop-down menu, choose MariaDBNext.
  4. Enter root in the Database user field. For the Database port field, enter the MySQL port number from the XAMPP control panel, and leave the Database password field blank. Set a password for production installations, and click Next.
  5. Read the copyright notice and press Continue to proceed to the server check.

During the server check, you may receive an error message asking you to enable Intl PHP Extension.

To bypass the error message and enable Intl PHP Extension:

  1. Head to the XAMPP folder on your PC to find the php.ini file. Open a plain text editor and add the following command line to the file: extension=php_intl.dll at the bottom.
  2. From there, locate the intl.default_locale and intl.error_level directives in the php.ini file and plugin:

[intl] 

intl.default_locale = en_utf8

intl.error_level = E_WARNING

  1. In the php.ini file, find extension=xmlrpc, extension=openssl, extension=soap, and extension=intl (if there are semicolons before the text, delete them). Save the changes and close the plain text editor.
  2. Open the XAMPP control panel and restart Apache by pressing the Stop button on the right. After a few seconds, it will turn into a Start button. Click it again.
  3. Head back to the Moodle installation page and click Reload.

After completing those five steps, the error message should be gone, allowing you to proceed with the installation.

  1. Scroll to the bottom of the page and press Continue. The installation will begin automatically. 
  2. After completing the installation, click Continue at the bottom of the page.
  3. Fill in the required fields to create your admin account, and press Update profile.
  4. Finalize your setup in the Front page settings – enter the site name and front page summary and configure the location settings, authentication system, and outgoing mail customization.

You’ve installed Moodle onto your local server.

Optimizing Your Moodle Performance

Installing Moodle for your website is just the first step, though, operating it is a whole different story. To get the most out of your software – you need a reliable server that can power it.

ScalaHosting’s VPS services provide all the CPU, RAM, and space necessary to run Moodle at maximum capacity. VPS hosting offers users all of the benefits of private hosting for the price of a shared account. Each server is divided into separate domains, and, instead of competing for system resources, users enjoy their own pool of CPU, RAM, disk space, etc. 

All Scala packages are fully customizable, making business and website expansion seamless. And if that isn’t enough, ScalaHosting’s intuitive control panel (SPanel) comes for free with our managed hosting packages. 

The platform is lightweight and easy to use, enabling you to get the most out of your server. Reach out to the ScalaHosting team and try it out today! 

Was this helpful?

What’s your goal today?

1. Sign up to our newsletter and keep up to date with the latest news. Our team consist of highly skilled ex-sysadmins and hosting veterans, ready to share their unique hosting-related knowledge with you.

Sign up for ScalaHosting monthly News Letter and we will keep you up to date about the most valuable pieces of content we publish on our blog

2. Explore our VPS Hosting - with our 30-day unconditional money-back guarantee and free, effortless migration, you can try our award-winning Managed Cloud VPS solutions risk-free.

Write a Comment

Required*

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.