How to change server address

How to change server address

by Rafal Zawierta -
Number of replies: 1
Hello!

Is there any chance to change server address of running moodle?
I have installed one at http://111.22.33.44/moodle and every link in moodle is related with 111.22.33.44 IP (eg https://111.22.33.44/moodle/login etc.)
Now I have domain (eg. moodle.rafal.net) so I (and other users) would prefer to use http://moodle.rafal.net rather than http://111.22.33.44/moodle

Now http://moodle.rafal.net is working fine (VirtualServer is configured properly), but every link on site http://moodle.rafal.net sends me to IP address.

Is it possible to fix it?

Regards
Rafal
Average of ratings: -
In reply to Rafal Zawierta

Re: How to change server address

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Yes, it can.
Do a dump of your database, open this dump with a good text editor and do a search-replace for http://111.22.33.44/moodle - http://moodle.rafal.net
Save it and restore. Done.

Sounds like an action from a mad man, but it works like a charm - did my 220MB database 2 weeks ago, 12000 items replaced cool