Moodle Install: How to Setup Moodle On A Windows or Linux Server
Moodle is a very popular platform for creating a custom e-learning website. It can be used for blended learning, distance education and flipped classrooms. Whether you are creating a site for a school, university, workplace or a private online course, Moodle has the customizable management features you want to create and manage online courses.
Moodle is a constantly evolving open source software product that pioneered a number of features that are now considered must haves for e-learning such as a calendar and grade book. There are over a thousand plugins that extend Moodle’s core software and a variety of themes to change the look of your Moodle site. It is supported on windows, linux, OS X and mobile devices. There is a Moodle mobile app available in all common app stores such as Google Play and iOS App Store.
See Also: Moodle Application Hosting
Moodle System Requirements
You will need a web server, database server and have PHP configured. Moodle requires some specific PHP extensions, but the install package will check and notify early during the install process. If you plan on having Moodle send email, you need Sendmail for Unix/Linux or access to an SMTP mail server for Windows.
Moodle requirements can vary based on the version of Moodle you are installing. The requirements listed here apply to Moodle 3.9. Check the release notes of the version you are installing for exact requirements.
Moodle support several database servers. Versions listed here are the minimum supported and Moodle recommends always using the most recent version if possible.
- PostgreSQL 9.5
- MySql 5.6
- MariaDB 10.2.29
- Microsoft SQL Server 2012
- Oracle Database 11.2
Moodle is built in Linux using PHP, but it is also supported on Windows Servers. You will need PHP 7.2.0 or higher and the PHP extension mbstring. If installing on a Windows server you will also need the Visual C++ Redistributable for Visual Studio 2012 or higher.
Hardware requirements should be taken as general recommendations and can vary based on the web site content and number of users.
- Disk Space: 200MB for Moodle code + enough for your content
- Processor: 2GHz dual core recommended
- Memory: 1GB for a smaller site, 8GB for production use
Moodle is tested on a wide range of browsers on a regular basis. It is compatible with Chrome, Firefox, Safari, Edge and Internet Explorer. MobileSafari and Google Chrome are supported on mobile devices. They have plans to stop supporting Internet Explorer 11 and do not currently support Internet Explorer 10 and below or Safari 7 and below
Recommended Moodle Servers
Here are a few servers which would work well for a Moodle site:
|Cloud Server||Dedicated Server|
4 CPU Cores
|Intel E3 1270v6|
2x 500GB SSD
|LEARN MORE||LEARN MORE|
Moodle Install Process
There are one-click installers for installing Moodle for Mac OS X and Windows available on the Moodle site. These would be unsuitable for production use, but ideal for testing or training. You can install Moodle on clustered servers, cloud VM’s and other hosted solutions. Just make sure the requirements listed above are met before beginning the install.
Preparing for Moodle Installation
Download Installation Files
There are a number of places you can download Moodle files. However, it is best to download them from Moodle.org. It is more secure and Moodle will assist you with the install if you run into issues using their files.
Download your desired version from http://moodle.org/downloads and unzip/unpack. This will create a folder called Moodle with a number of files and folders. Place that whole folder in your web server documents directory. For live sites, you will want to make sure the files are not writeable by the web server user.
Create an Empty Database
Next, you will need a blank database for your installation. Make note of the database server hostname, the database name and the username and password for your newly created database.
Moodle Data Directory
Moodle needs a directory to store all it files – your content, session data, temporary data, etc. Consider how much storage you are going to need before creating this directory. This directory should be optimized for fast caching of data and must not be accessible directly from the web. This would create a serious security flaw. It cannot be placed in your web root or your Moodle program files directory.
Run the Moodle installer to create the Moodle database tables and configure you web site. The recommended method is the command line installer, but there is a web-based installer available for Windows.
Command Line Installer
Best practice is to run the command line installer as the web user. You may have to adjust the example here depending on your version of Linux / Unix.
You will be prompted for options that are not covered in the example. If unsure, select the defaults. So see a complete list of options use:
Web Based Installer
It is very easy to install Moodle via the web. Make sure that your page is not public until the installation is complete.
Go to your Moodle’s main URL using a web browser and the web installer script will start automatically. That will most likely be http://yourwebserver.com/moodle or http://yourwebserver.com depending on where you placed the Moodle files on the web server.
The wizard will ask you to select a language and confirm copyright. Simple click next and continue. It will confirm paths and database settings. This is where you will enter the database host and database names. Click next and Moodle will complete server and software checks. If there are errors or warnings, click Continue to begin the installation process. Be patient, it may take some time to complete.
Next you will set up the admin account on your Moodle site. Enter the login details and click Update Profile. You will be prompted for Front Page Settings such as page descriptions. These can be updated at anytime.
Finally, you should see a message that you have successfully installed Moodle and be directed to the front page.
There are few options within Moodle site administration that you will want to configure before going live.
- Outgoing Mail Configuration – Set your smtp server and authentication. You can also set a noreply email here.
- Support Contact – Set your support contact email up.
- System Paths – Set paths for du, dot and aspell directories.
- HTTP: Set up your proxy credentials if using a firewall.
- Update Time Zones: Make sure time zone information is correct.
Moodle Installation is Complete!
Installing Moodle is now complete and you are ready to start creating courses. If something goes wrong, check the permissions on you data directory. Make sure your web server can read your Moodle data directory.
You can always edit the configuration file (config.php) by hand and set your options there. Did you install any optional plugins before running the main install script? If so uninstall the plugins, install Moodle and then and reinstall the plugins.