How to configure Moodle to work with a new domain?
In order to configure Moodle to work properly with another domain, you should modify the config.php file located Moodle’s main folder. You should change this line: $CFG->wwwroot = ‘http://olddomain.com‘ ; to $CFG->wwwroot = ‘http://newdomain.com‘ ;