Configuration file – MoodleDocs (2024)

The name for Moodle's configuration file is config.php. The file is located in the moodle directory. It is not included in the Moodle download packages and is created by the installation process from the template file config-dist.php (which is included in Moodle packages).

  • 1 config-dist.php
  • 2 Setting $CFG->wwwroot correctly
  • 3 Enabling password salting
  • 4 Including passwords in backups
  • 5 Changing default block layout for new courses
  • 6 Changing default theme directory location
  • 7 Disabling update notifications
  • 8 Enabling debugging
  • 9 See also

config-dist.php

Although the installation process creates the config.php file for you, there may be times when you want to do this yourself. A sample config file, called config-dist.php, is shipped with Moodle.

To get started simply copy config-dist.php to config.php, then edit config.php with you favourite editor. The file is very well commented. The important options (which you must supply) are all nearer the top. Other less common options are further down.

Setting $CFG->wwwroot correctly

This setting must be a fixed URL (a string constant) that points to your site. Do not try to set this with any PHP code that can generate a variable URL. This is not supported, can cause strange problems and will stop command line scripts working completely. If your site is accessed from different IP addresses this should be done with a split DNS, see Masquerading

Enabling password salting

See Password salting.

Including passwords in backups

Hashed user passwords are no longer saved in backup files containing user data.

If you really need passwords to be saved (in the rare case of restoring a backup with user data to a different site), the following line may be added to config.php:

$CFG->includeuserpasswordsinbackup

Note regarding restoring Moodle 2.5 backups to sites with old PHP versions:

Because bcrypt is not supported in PHP versions below 5.3.7, course backups made using the $CFG->includeuserpasswordsinbackup setting on a site using PHP version 5.3.7+ that are subsequently restored to a site with PHP version < 5.3.7 will require a password reset.

Changing default block layout for new courses

See Block layout.

Changing default theme directory location

The location of theme directories may be altered, using the variables $CFG->themewww and $CFG->themedir. Themes placed in the directory specified by these variables will then be available for selection using the theme selector.

For example, should you wish to place themes in a subdirectory called 'my_moodle_themes', your config.php might look like this:

$CFG->wwwroot = 'http://my.moodle.site.edu';$CFG->dirroot = '/var/www/my.moodle.site.edu/public_html';$CFG->themewww = $CFG->wwwroot . '/my_moodle_themes';$CFG->themedir = $CFG->dirroot . '/my_moodle_themes';

Disabling update notifications

See Notifications.

Enabling debugging

See Debugging.

See also

Configuration file – MoodleDocs (2024)
Top Articles
Wire Transfer vs Direct Deposit: Which is Best for Your Business?
Can I dispute & reverse a wire transfer?
Fort Morgan Hometown Takeover Map
Genesis Parsippany
25X11X10 Atv Tires Tractor Supply
Rubfinder
Nestle Paystub
Culver's Flavor Of The Day Monroe
Does Pappadeaux Pay Weekly
Missing 2023 Showtimes Near Lucas Cinemas Albertville
Valentina Gonzalez Leaked Videos And Images - EroThots
4Chan Louisville
Cvs Appointment For Booster Shot
Arre St Wv Srj
If you bought Canned or Pouched Tuna between June 1, 2011 and July 1, 2015, you may qualify to get cash from class action settlements totaling $152.2 million
Kentuky Fried Chicken Near Me
Speedstepper
Abga Gestation Calculator
Healthy Kaiserpermanente Org Sign On
Gopher Carts Pensacola Beach
HP PARTSURFER - spare part search portal
031515 828
FSA Award Package
Isablove
Was heißt AMK? » Bedeutung und Herkunft des Ausdrucks
Homewatch Caregivers Salary
Restaurants Near Calvary Cemetery
2024 Coachella Predictions
67-72 Chevy Truck Parts Craigslist
Kelsey Mcewen Photos
Regis Sectional Havertys
Craigslist Jobs Brownsville Tx
Koninklijk Theater Tuschinski
Mixer grinder buying guide: Everything you need to know before choosing between a traditional and bullet mixer grinder
Taylor University Baseball Roster
Sig Mlok Bayonet Mount
Autum Catholic Store
Gotrax Scooter Error Code E2
R: Getting Help with R
Craigslist Com St Cloud Mn
Comanche Or Crow Crossword Clue
Scythe Banned Combos
2294141287
Wpne Tv Schedule
R Detroit Lions
Houston Primary Care Byron Ga
Ff14 Palebloom Kudzu Cloth
Die 10 wichtigsten Sehenswürdigkeiten in NYC, die Sie kennen sollten
How to Choose Where to Study Abroad
Noaa Duluth Mn
Latest Posts
Article information

Author: Neely Ledner

Last Updated:

Views: 6115

Rating: 4.1 / 5 (42 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Neely Ledner

Birthday: 1998-06-09

Address: 443 Barrows Terrace, New Jodyberg, CO 57462-5329

Phone: +2433516856029

Job: Central Legal Facilitator

Hobby: Backpacking, Jogging, Magic, Driving, Macrame, Embroidery, Foraging

Introduction: My name is Neely Ledner, I am a bright, determined, beautiful, adventurous, adventurous, spotless, calm person who loves writing and wants to share my knowledge and understanding with you.