Knowledge Base

Get Expert Website Hosting

Choose website reliability and expertise with SiteGround!

Home / Other Applications / Moodle / How to configure Moodle to work with a new domain?

How to configure Moodle to work with a new domain?

Last update: Aug 07, 2025

To configure Moodle to work properly with another domain, modify the config.php file located Moodle’s main folder.

Change this line:

$CFG->wwwroot = ‘http://olddomain.com‘ ;

to

$CFG->wwwroot = ‘http://newdomain.com‘ ;

Share this article