Been there ... done that! You were on the right path ... just one hickup/snafu - which, unfortunately, led to a lot of work.
It happens ... case in point ... used to support RackSpace VPS Moodles that began their lives when CentOS 5 was current/supported. No method to update the OS in place so had to backup everything done on those CentOS 5 systems ... thank goodness RS had attached devices for storage that one could attach to an instance, then detach. Then rebuild the CentOS 5 systems to CentOS 7's keeping same IP address. Re-attach device. Restore the Moodle's. Good for until CentOS 7 reaches EOL, then.
Wouldn't care to document that as it's specific to RS but other hosting providers might/could have attached storage which can be attached to multiple systems ... on different networks ... Google offers that. Amazon probably does as well.
But, one thing I'll never do ... go to shared hosting cause it has 'easy installs' ... which I learned along time ago were tip of a very deep iceburg.
Now is what am sharing a detractor to using CentOS ... yes and no. Ubuntu, even if the most popular, also has potential issues ... they have upgrade in place (50/50?). They also have reputation/goal of latest and greatest ... possible to get your PHP/MariaDB/MySQL to versions too high for Moodle.
At least with a VPS am in control of my own fate! Yes, might cost more ... but put pencil to shared hosting cost in attempting to maintain/upgrade etc. a moodle. Cost is also your time .... not only $ ... and your time is more valuable, IMHO!!
Anyhoo ... my 2 'sense'!