Moodledata directory

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Moodledata directory.

The moodledata directory is the location of files that are uploaded or created by the Moodle interface. Since it is a directory, it can have a different name and location than the default name of "moodledata.

The moodledata directory is initially created with an initial install of a Moodle site. Site administrators can see the actual moodledata directory name and location in the config.php file.

The purpose of this page is to give an overview of this directory.


Moodledata directory/folder

In the moodledata folder there are folders called:

  • 1, 2, 3 and so forth for each course
  • Cache
  • Sessions
  • temp
  • upgradelogs
  • Users

There maybe other folders that the moodle code needs to create such as

  • Groups
  • lang
  • mysql

Course folders

Course folders are named with the course id. Usually the front page will be 1, and the first course will be 1 and so forth.

Each course folder holds the content of the course Files. Thus a course folder may have many subfolders. For example, the course backup file will be found in this folder.

Cache folder

Sessions folder

Keeps session information

Temp folder

Upgradelogs folder

User folder

Different versions of Moodle have different ways to tracking user folders. Under the moodledata/user folder you may see a 0 folder. In side the 0 folder you should find a 2 folder, which is generally the admin's folder. User folder contain the user pictures, labeled f1.png and f2.png.

Groups folder

This folder is created when a group is formed. Each group will have a folder with a naming scheme similar to user folders

Lang folder

The lang folder is created when language pack is added after an initial install, or a language pack is edited. For example, sites that first install the en language, then install the version en_us, will find the lang folder, with a sub folder called en_us_utf8, with subfolders under that called docs and help.

When an en user edits the language strings, say changing "teacher" to "instructor", a subfolder is created in the lang folder.