Changing Domain Name

Changing Domain Name

by Graham Stone -
Number of replies: 6
Picture of Testers

Good Morning,

Our web development team are wanting to change the domain name of one of our VLEs, what parts of our Moodle setup would we need to change to ensure that the VLE continues to work?

Thanks,

 

Average of ratings: -
In reply to Graham Stone

Re: Changing Domain Name

by Luis de Vasconcelos -
Picture of Particularly helpful Moodlers

As Guillermo said, change your $CFG->wwwroot and then run the /admin/replace.php tool to change olddomain.com to newdomain.com. But be aware that this replace.php script doesn't work on all platforms. See (and vote for) MDL-35099 so that it gets fixed.

Average of ratings: Useful (1)
In reply to Luis de Vasconcelos

Re: Changing Domain Name

by Guillermo Madero -

I think it is best to dump the db and then work directly with the SQL file; this is what I usually do.

In reply to Guillermo Madero

Re: Changing Domain Name

by Luis de Vasconcelos -
Picture of Particularly helpful Moodlers

Sure, on MySQL that's not a problem. But MSSQL doesn't have a 'mysqldump' equivalent.

In reply to Luis de Vasconcelos

Re: Changing Domain Name

by Graham Stone -
Picture of Testers

Thanks Guillermo and Luis, the domain name change over went without a hitch big grin

In reply to Luis de Vasconcelos

Re: Changing Domain Name

by Guillermo Madero -

Yes, you are right, in this case I guess it would then be best to search & replace directly, via SQL.