Moodle runs on any web server that supports the PHP programming language and a database. It works best, and there is more support, when running on the Apache web server with a MySQL database. These requirements—Apache, PHP, and MySQL—are common to almost all commercial web hosts, even the cheaper ones.
The Moodle learning management system resides in three places on your web host:
- The application occupies one directory, with many subdirectories for the various modules
- Data files that the students and teachers upload—such as photos and assignments submitted by students—reside in the Moodle data directory
- Course material that you create with Moodle (web pages, quizzes, workshops, lessons, and so on), grades, user information, and user logs reside in the Moodle database
The following screenshot shows you my Moodle application directory. Without even knowing much about Moodle, you can guess the function of several of the directories.
For example, the admin
directory holds the PHP code that creates the administrative pages, the lang
directory holds translations of the Moodle interface, and the mod
directory holds the various modules.
The index.php
file is the Moodle home page. If a student was browsing my Moodle site, the first page that the student would read is the http://moodle.williamrice.com/index.php file.
As each of Moodle's core components and modules are in its own subdirectory, the software can be easily updated by replacing the old files with new ones. You should periodically check the https://www.moodle.org website for news about updates and bug fixes.
Moodle stores the files uploaded by the users in a data directory. This directory should not be accessible to the general public over the web, that is, you should not be able to type in the URL for this directory and access it using a web browser. You can protect it either using a .htaccess
file or by placing the directory outside of the web server's documents directory.
While the Moodle data directory stores the files uploaded by students, the Moodle database stores most of the information in your Moodle site. The database stores objects that you create using Moodle. For example, Moodle enables you to create web pages for your courses. The actual HTML code for these web pages is stored in the database. Links that you add to a course, the settings, the content of forums and wikis, and quizzes created with Moodle, are all examples of data stored in the Moodle database.
The three parts of Moodle—the application, data directory, and database—work together to create your learning site. Backup and disaster recovery are obvious applications of this knowledge. However, knowing how the three parts work together is also helpful when upgrading, troubleshooting, and moving your site between servers.