To do this, I just move the database, update config.ini, and then try out the forum.
y.com (the new domain), redirects to x.com (the old domain).
I didn't use impex because I tried that once years ago. It imports posts instead of settings. I.e. not all settings are migrated, and then I have to do about 3 hours of work recreating user groups, resetting permissions, etc.
What would be the proper process for just moving database and script to a new server, and having the forum work instead of redirecting visitors to the old server?
- - - Updated - - -
I just found the solution. After installation, access the admin cpanel: settings > options > Site name / url / contact details > update site address.
Done.