Changing moodle url

Changing moodle url

by jeKnowledge jeKnowledge -
Number of replies: 1

Hello, I've got a moodle running in a server, with a custom URL. I just bought a new url and I wan't to change the moodle URL to this new one. How do I do that?

Do i just go to the config.php file and change the $CFG->wwwroot to the new url? I think I need to do something else related with DNS stuff but I'm not sure.

Thanks.

Average of ratings: -
In reply to jeKnowledge jeKnowledge

Re: Changing moodle url

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You will need to do DNS changes so that the new url points to this server.  Where you will do this will depend on your network setup and domain host.

For Moodle, you need to change the url in config.php and then use the replace tool on the database so that all links are updated to the new url as well.  This is found at "yoursite.com"/admin/tools/replace/index.php