Seeking advice regarding site upgrade and migration


I have two KnownHost VPS accounts. One is slightly older, in terms of installation, and it holds my biggest site.

I have a couple of problems that I need to sort out. I'm not looking for someone to tell me every step to take, but I'm hoping I can get some advice as to the order of big steps I need to take to accomplish my goals.

Goal 1 is to update the old site to the latest PHP & MySQL.
Goal 2 is to migrate site to newer VPS, where I will upgrade ( and update ) the VPS and get rid of the older VPS.

( Regarding the sites, they are all my own custom rolled code, so I will have to handle any code fixes myself. There aren't any updates I can download. Typically I like to do that on my localhost setup, which is on Windows. I'm considering setting up a localhost Linux box to help with this process. )

First concern is MySQL. I'm on 5.0 on the first server and 5.1 on the second.

I want to get the destination server up to 5.7, ideally, but MySQL recommends that databases are incrementally upgraded. So apparently I will need to upgrade the database a few times to get it up to the latest version.

My concern is juggling the upgrade process and at the same time dealing with migration. I want to do this with as little downtime as possible, and of course, hopefully without data loss or complications.

My PHP is stuck on 5.4 and I want to get that up to 7 if possible.

Is there a preferred approach to this scenario? Should I focus entirely on the database first and deal with PHP after I've migrated and upgraded? I'm honestly not sure if there are compatibility issues with all of these various versions of MySQL and PHP. I was looking for a basic compatibility chart, but I didn't find one.

After I developed my last couple of sites, I took an extended break from any backend development. The sites have been humming along without any issues. But now it's time to dive in move forward again.

Any advice is greatly appreciated. Thanks.
Hi marcm,

I assume you're running cPanel since you're posting in this forum so because of that you're going to be limited on what you can upgrade to by what it supports. Taking a quick look in my WHM I see where MySQL 5.6 and PHP 5.6.16 are the highest versions supported. Because of this any local machine that you set up will need to have cPanel.

As far as upgrading MySQL incrementally goes you'll again be limited to what cPanel supports, if there are incremental steps between where you are and where you are going then, if you want, upgrade incrementally. However I've never had a problem jumping from what I was running up to the latest that cPanel supports. I would also hope that the cPanel developers would know of upgrade issues and possibly even force you to do multiple upgrades if it were necessary. It's been several years since I ran into an issue upgrading MySQL so I would hope you would be ok.

You upgrade MySQL in WHM at Software | MySQL/MariaDB Upgrade.

PHP will probably be what you have more issues in your code with when upgrading but, again, you're limited to what cPanel supports. Unlike you I don't do my own custom coding so I was able to avoid most issues by simply upgrading to the latest packaged software. I'm sure that anything you run into will have also been run into by others and you should be able to Google it without much difficulty.

PHP is upgraded at the same time as Apache using EasyApache which you will find in WHM at Software | EasyApache 3/4.

If it were me I would upgrade as far as I could on my existing server before migrating to the new one. That way your new server will have everything at the latest level rather than running older versions and having to upgrade it.

Hope that helps!