Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Creating Moodle site data directory/Data directory.

Creating Moodle site data directory/Data directory

From MoodleDocs

The Moodle data directory (often called moodledata) contains course, user and other site information that is used by the Moodle code. It is usually created and placed as part of the Moodle site install process.

Security warning: It is CRITICAL that this directory is NOT accessible directly via the web. If someone from the web can enter a url in their browser and reach any of the data directory's sub directories, then your site will have major problems. There are some users of the web who are NOT friendly and enjoy finding weaknesses and then causing havoc.

Tip: Some webhost automatic install scripts may override the Moodle installer defaults.

Sub directories

For general information purposes, here is a brief description of a moodledata folder:

  • Courses folder are labeled with their course id numbers
  • cashe
  • lang - holds other language directories, or edited language php files
  • sessions - holds session information for users
  • temp - has subfolders for backup, csvimport, unzip, typo3temp and other directories
  • upgradelogs - hold logfiles generated when Moodle upgraded
  • user - each user has a folder that is labeled with their user id
Example of moodledata folder in a Windows localhost server

See also

Creating Moodle site data directory - When the data directory is not created in the install process

Development:File API - the 2.0 Moodle file handling system uses the data directory