Is it [easily/safely] possible to change the hostname of a Moodle server?
I'm an overworked sysadmin and Moodle server maintenance forms only a small part of my job.
For live internal use we install a new Moodle server (with a new hostname) every year, but we also have a public-facing demo server (to act as a public demo site for our academic's specific Moodle-based project). Our academic would prefer that the hostname of the demo server does not change, although we have explained that this would be very difficult to try to implement in practice (at least not without an extended period of downtime to transfer the hostname/DNS from the old server to the new server).
Our normal method of trying to handle such a situation for non-Moodle websites is to initially install the new site under a temporary hostname, and then update the Apache config and DNS to serve the new site with the transferred hostname.
We are not dedicated Moodle admins, so don't have much in-depth knowledge about it, but our academic understands that, unlike many web CMSes which will happily restart successfully under a changed hostname, unfortunately, Moodle does not like it if the server hostname changes from that which Moodle was actually originally installed under?
The only relevant looking information that I have managed to find so far is: