What randomz said is the best way to do it. Spin up a new server, migrate all the accounts and I’d even migrate webmin settings through “backup configuration” for a seamless transfer.
Alternatively, you can check conversion scripts to simply upgrade your centos 7 to a more current rhel or at least rhel-based distro. This introduces some uncertainties and even though at first everything seems alright, in some cases after some time you notice that something is broken especially if your server runs a lot of different stuff.
Either way, the procedures are not very complicated and they are very well documented. If full server backups are available, use them before attempting the conversion, and if you’re able to spin up a clone for a conversion dry run- even better.
Unless your websites or their extensions are running very old, legacy code like php 5.6 they should still work
Don’t forget to do it one step at a time. Do not be rushed. Document everything.
Many of us have done this before, with different OS (small systems to large) on development and production. So it might look daunting now but it will happen again - it is the nature of IT (fact of life).
I’d advise against it! Only migrate virtual servers (domains/websites) because newer system software versions may have different settings/options. Webmin will also handle those services differently through its configuration files. So, it’s best to set up a new instance, like Rocky 9, and just transfer the websites. That should be more than enough, and fairly a straightforward process.
@ASM2 Read our documentation; it should help. Start with: