Migrating a PHP core Website from another hosting to my Virtualmin

Hi
I’m a newbie to Virtualmin so please go easy … :grinning:
I have a lot of sites in hostgator which I manage via whm
and a techie said this is much cheaper with a vps and virtualmin - so he installed virtualmin on a vps that i got on another hosting service.
Now I am told… I have to migrate all my PHP core sites manually to the vitualmin server
OK So…
I get about create virtual server etc…
So I’ve made that for each domain
and have 3 backups on my hard drive for each website
Full Backup, Home Directory Backup and My SQL Backup
So I basically unzip and Expand the backup on my hard drive go to the public_html folder and FTP everything from my hard drive back up to the home directory public_html folder on the virtual server for that domain.
How do I copy across the My SQL backup to the virtual server? Where do I put this via FTP?
Do I have to create a new database mysql in the VS? and then copy all into that?
I’m not sure
I tried searching for this but there too much stuff about how to migrate WordPress and almost nothing about how to manually take a website from another hosting into virtualmin (a normal core php website)
Also if there is an easier way to just use some software put the full backup in and it’ll do the rest for me?
Please help - or point me to some videos or instructions on this

Thanks
Regards
ASM2

Hello @ASM2 and welcome to the community.

Good for you. One can never have too many backups.

You have already created virtual servers. Good. Drop to shell and

mysqldump -h hostgator-ip -u hostgator-username -phostgator-password hostgatordb | mysql -h localhost -u virtualmin-username -pvirtualmin-password virtualmin-username

This should create a copy of your hostgator database on Virtualmin.

No, when you create a virtual server, a database is also created by default.

1 Like

This is not advice, but only my own experience.

I migrated a whole bunch of PHP sites, including one WP site, by doing nothing but SCP’ing the cPanel backups to the Virtualmin server and using Virtualmin > Add Servers > Migrate Virtual Server to do the migration. To quote the Raven, “Only this and nothing more.”

I did do things like check PHP and MySQL version compatibility; but functionally, all the sites imported flawlessly with the installed defaults – by which I mean they all worked.

There was a problem with Awstats because of the way cPanel stores the records for the SSL and non-SSL versions separately, but I think Jamie has since addressed that in the migration script. It required me merging the files after the migration, which I recall being easy, although I don’t recall exactly how I did it. In any case, I think that bug has been stomped.

That’s not advice. It’s just my experience. Also, all of the sites were sites that I personally own, so I had the luxury of not having to worry about angry clients. But in the end, it all worked out just fine using the built-in migration.

Richard

1 Like

In all my years in IT, I’ve never heard anyone say, “Gee, I wish we didn’t have so many good backups to choose from.”

Richard

Hi Richard
Thanks for your help - Looks like its pretty easy the way you describe
and so:-
I tried this with one website = uploaded the actual backup.tar file (I guess that’s what you mean)
but it keeps saying:
Validating migration file …
… validation failed : A password must be supplied for cPanel migrations
I’m not sure what to do… does it mean the password of the cpanel in Hostgator? in any case where do I put the password? as there is no column or place to enter it even if I knew which password they were asking for…

In case you cant see the above pic here’s a link
https://i.postimg.cc/d3Gcmwjn/Migrate-new-server-pic-1.jpg

Please help
Thanks
Regards
ASM2

As I recall, I used the cPanel passwords for each domain I was migrating into Virtualmin. That was easy because I owned all the sites, so I knew the passwords. It would have been a bit more of a bother if they were client sites.

Richard

Hey @ASM2, it seems the password is a hurdle preventing you from using the migrate option so why dont you try the method that I had proposed?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.