Today, I am moving to a new Hosting. I found it too time taking and bit boring to copy everything. It is not just files. It includes Databases and many other settings.
Though I am shifting from Cpanel hosting account to Cpanel hosting on some other server (I like Cpanel, very easy to use and so many features). I am still moving my account and finding it a monotonous job to move everything. Earlier today, I tried searching for some tool which can transfer everything i.e. by simply giving some commands I can have same things i.e. files, structures, databases and all other settings same as it was in my old hosting (OLD). I am not able to find one such tool, but will like to share what you should remember to do and how you can do them.
Do remember there are not just Files and Databases that needs to be shifted or moved to New hosting (NEW), but there are other settings like Parked Domains, Addon Domains, Sub-Domains, MX Entry, CNAME records, FTP account, Email Accounts, Cron Jobs and some other settings like Password Protect Directory. We will discuss all these now.
Files
These are all the files which you need to transfer from OLD to NEW. Lets discuss how to transfer them. Well, if there are large number of files that are to be moved and if you have slow internet connection then it would take much longer time to download files from OLD and upload it to NEW. For this you can take a Remote FTP back up from OLD for NEW.
By using this option a .tar file will be shown in NEW after Remote FTP back up. Click on this file and then Extract it. After extracting you can move it to public_html folder. It can be moved using 2 options. Either from File Manager or Legacy File Manager.
Use can also use some FTP client like Filezilla, Core FTP or Cute FTP etc. By using this option, you need to connect to your OLD and then download all files in your system. After all files have downloaded to your system successfully, you need to connect to NEW and then upload all these files.
Database
Database backup can be taken from OLD in 2 ways. Either from Backup option or from PHPMyAdmin.
- From BackUps, you can click on database name and download will start for that database.
- From PHPMyAdmin you have to click on database in left panel, then choose Export and then Export button in the bottom right.
- On this page you can choose in which format to download database and if it is SQL then you can choose it to be zipped too.
Now, after downloading all databases go to NEW and restore databases in 2 ways again.
- Either from backups or
- from PHPMyAdmin
From Backups, you need to browse file from your system and upload. Do it for all database files.
Under PHPMyAdmin, you can use import. Browse file from your system and upload it. If the file is very large in size then it will ask after sometime to upload same file and will start executing the file now from where it left earlier (this may go on for some time depending on file size).
If both the above options are taking much time then you can use some desktop software like SQLyog. Make sure that Remote Access is enabled for your database. It can be seen from Remote MySQL on Cpanel Homepage. After going to Remote MySQL page, add your IP address (IP address from which you will be using desktop software). If you don’t know your IP address then go to http://ip-adress.com to know your IP Address.
Database Connection Change Username and Password
This one comes under both Files and Database. For all connection files to database, you need to make changes. Like Database Username, Database Password (it may be same), Database Name. For Database Username and Name prefix needs to be changed as in most cases you have different Usernames for your Cpanel account.
Parked Domains
Add parked domains from OLD to NEW. See which domains are parked in OLD and create them in NEW. If you perform this action then it might ask to change Nameservers first (so that nameservers point to NEW. Jump to Nameservers section below. (Some host give an option to verify that you own this domain by having other options like upload a file to OLD, set an A record etc.)
Addon Domains
Similarly like parked domains, copy from OLD to NEW. Create directories (as you have already moved your files, so these directories already exists). Please note that with some hosts you can create addon directory anywhere i.e. directly under public_html or inside a folder which is inside public_html i.e. inside a subfolder or sub-sub folder etc. But some hosts allow only to have a addon directory just under public_html i.e. immediate to public_html. So, if you have Structure 1 in your OLD and Structure 2 in your NEW, then you need to move files from sub-sub folders to under public_html.
Nameservers
For every domain name you were using in your OLD, you need to update the nameservers for them to point them to new. You can also use A records if you don’t want to use Nameservers. Some domain name sites provide these features like Namecheap.com
MX Entry
Create MX records for mails. View them in OLD and create in NEW. It can be used when you are using some external Mail Exchanger. There are various options in this section. If you want to use Google apps for a domain name then you can change settings here.
Please note that if you have done settings for Google Apps and aren’t receiving mails then check if a record with 0 priority and destination as Domain Name exist. If it exists then remove this record.
Sub-Domains
From OLD copy each record and create it on NEW. You have to do it manually. Please take note of the path of files if there is any change in file structure.
Redirects
View what redirects have been configured in OLD and create them in NEW.
Simple DNS Zone Editor
After sub-domains have been created you will see many records matching between NEW and OLD. Now you need to add other records which could be CNAME records etc.
Advanced DNS Zone Editor
If there are some specific settings done in this section then copy them to NEW.
CNAME records
These can be created in Simple DNS Zone Editor
FTP accounts
You can create these accounts again in NEW like they are in OLD. If there are multiple sites hosted or there are multiple FTP accounts in OLD then it could mean that different people access different accounts (it is possible that they are accessing them from different locations too and have configured/saved FTP settings in their FTP clients). So, try creating New FTP accounts with same password. Also, remember you need to tell some of these users (if they were using the main account username and it may change) that they need to update.
Email Accounts
Set up email accounts like they were in OLD. Please remember that it is possible you have to create new accounts so password will change. Inform users about their new passwords.
Email Forwarders
Copy these from OLD and implement them in NEW.
Cron Jobs
View what are various cron jobs listed in OLD and create them in NEW. Do remember to change path (in case username is changed). Also, some sites do not have home directory named home, but it could be home1, home2 or something else.
One more thing, remember the time factor. Earlier you might have set cron jobs time execution at a particular time according to your OLD server timings and now at NEW server timings might have been changed.
Password Protect Directory
Now this cannot be seen directly from OLD. You have to remember which directories were protected or you need to browse through file structure in this section under OLD. After you find a lock on a folder in OLD then you can protect them under NEW. One cool thing here is that, in NEW also (as you have earlier copied files from OLD) you will find Password Protect Directories, because some settings within files are copied in NEW now.
I have done these changes and there could be some more (other than mentioned above). Share them here if you come across some such sections.