How to migrate a sub-domain from a shared hosting cpanel to a VPS cpanel - migration

My shared hosting structure is as such that allows we to host up to 5 domain under same account which turns out to be as:
/home/MainDomain/public_html/domian1/
/home/MainDomain/public_html/domian2/
/home/MainDomain/public_html/domian3/
etc...
I want to migrate domain1 to a newly purchased VPS hosting company which they have provided me with WHM/cpanel.
If I use the Backup utility from the old shared hosting, it will backup everything (meaning other domains too).
My question is how do I migrate domain1 with all its DBs, cron jobs, and emails to my new VPS account.
Thank you.

There is a functionality in WHM (WHM 64+ versions I believe) that allows you to to convert an addon domain inside a cPanel account into an invidiual cPanel account.
Since you have multiple domains on the same account and I suppose you have websites for those domains as well, then those domains are added as "addon domains" into your cPanel account. So use that WHM convertor tool, convert the desired domain from that cPanel account as a new invidiual cPanel account.
Then create a full cPanel backup for that account. You can do that either from the cPanel web interface or command line (ssh shell). Once you have the full backup file you can copy it to the new server and restore it from the command line or you can use the WHM transfer tool to transfer the cPanel account from one server to another.

Related

How to move a website from shared hosting to VPS?

Because of resource and performance problems I want to move my website from Shared hosting to VPS. In this process, I also want to migrate from PHP 5.6 to PHP 7.4. Therefore I need to re-code the PHP scripts. So I need time for my own on the new Plesk server to get things done.
I have the next steps in mind:
Create the webspace with the domain name on Plesk.
Upload the sources and database to the VPS.
Install an SSL certificate on the new site.
Add the domain name to the hosts file.
Re-code and test the new site.
Change the DNS to the new IPs.
There is a deadlock situation, however.
I can not issue a new SSL certificate without changing the DNS.
I can not migrate and test the site without an SSL certificate.
Of course, this is done before by many developers, but how it's done?
Does anyone know? And which other problems can I expect?
Purchase a wildcard certificate or create one by letsencrypt
And use a subdomain like test.yourdomaine
And point it to your reverse proxy vps new ip

Install SSH Certificate in WHM via SSH

I have a server with around 300 cpanel accounts on WHM and would like to install SSL Certificates for those website in bulk (the certificates are all available already).
I know there is the WHM option to install SSL Certificates for Domains - however is there a way to do this via SSH as well?
WHM has multiple scripts like backing up Cpanel accounts, or restoring them, suspending them etc. Is there a way to install certificates like this too? (If so, I was not able to find it on the WHM documentation)
Or would I have to go the Apache / Centos installation way on SSH?
Thanks for any input or suggestions!
Using the WHM API 1 functions located in whmapi1 it is possible to achieve most of the WHM functions of the backend

Backup cpanel account with SSL

I have a live server which has cPanel installed on it. It is hosting a website with a SSL certificate that got installed in Cpanel for the cpanel-user hosting the domain.
I now downloaded a backup of this cpanel account to my dev server (and restored it in WHM, dev server is using cpanel too) for testing purposes, however I have a question regarding the SSL:
Does the SSL certificate get copied when the cpanel account gets backed-up?
After changing my host file i am still able to see the website using SSL (even though its on the dev server and there was not a certificate installed). My understanding was that the SSL is specific for each server, because the CSR is done on the server the certificate should run on.
Why am I able to access both live and dev using https?
Yes, SSL certificate will be migrate When you migrate OR restore your account through cPanel/WHM tool.

Transfer tool WHM

When using the transfer tool on WHM to move an account from one server to another does the old server website still remain live in the process?
Transfer process will not terminate your account from old server. You will have to update your domain nameserver so that your domain will be resolve to your new server.
Transfer tool will help you to copy content, database from old server to new server. Once you copied all data then you need to point domain DNS to new server i.e IP and Nameserver and then website will start running from new server post DNS propagation.

VPS Adon Domains vs Individual Cpanel

I have 10 websites on a VPS. Should each one have its on cPanel or is it better to have 1 cPanel and have 9 adon domains?
Which way uses the least amount of server ram?
If your customer demands individual cPanel accounts to manage their websites themeselves, seperate cPanel is good option. If you are going to manage all website at your own there is no need to create cPanel accounts.
As far as server RAM usage concerns, when cPanel account will be accessed it will consume the RAM. When cPanel (website) is not in use your VPS RAM wont be utilised. If you never access the other cPanels there wont be any difference in RAM usage whether you go for separate cPanel account or with addon domain option. However, with separate cPanel account option you will have ease of managing domain, websites, DNS, backups etc.
I will suggest you please create separate cPanel account for your 10 domains so that you can easily find out which user is using high server resources