Moving to a new server

All about creating websites!
Post Reply
User avatar
intern3t
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 119
Joined: 18 Aug 2010, 02:06
13

Moving to a new server

Post by intern3t »

good day, i want to move my websites from a reseller account(using whm) to my vps(with whm installed as well). how do i go about it without any problems.

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Moving to a new server

Post by bad_brain »

most important will be that both WHM installations have the same version, else you might run into problems with transferring the WHM database.

alright, let's get started:

---old location---
- log in to phpmyadmin
- export all databases one by one (you can skip the mysql_schema one if present)
- download all the files of the websites, if you have shell access you can tar.gz the whole directory first which will speed up the download

---new location---
- import the WHM database dump, make sure the database name in the dump (look for USE DATABASE and CREATE DATABASE IF NOT EXIST statements at the beginning of the .sql file) matches with the one on the server, if not simply comment out the lines with the SQL statements above in the .sql file. upload the .sql file to the server and then import it into the database (notice there are no whitespaces between the 2 latter switches):

Code: Select all

mysql -h localhost -uroot -pPassword whm_database_name < database-dumpfile.sql
- I am not sure if WHM creates the customer databases and web directories then by itself, make sure to check that by logging in to the sql console on the server (notice that the MySQL root password is usually an extra one, should not be confused with the regular root account):
mysql -uroot -pPassword
show databases;
###to leave the mysql console###
quit
- if it shows the databases you can import the other database dumps one by one like you did with the one for the WHM database.
- upload the website files into the proper directories (create them first if needed or simply upload the whole directories, watch out for the proper permissions and ownerships though, if needed create a dummy account in WHM and then compare the directory settings of that account).

that's all.... :wink:

---the way I would do it---
- getting rid of WHM, if there are install templates for the OS pick a minimal one (Debian preferred) without WHM or "LAMP".
- install EasySCP as hosting framework, it rocks and uses way less resources (it'll install all software needed automatically): http://www.easyscp.net" onclick="window.open(this.href);return false;
- set up all accounts (like databases, email, ftp) manually in EasySCP
- import files and databases for the sites like described above.
your system would run much better, more secure and more user-friendly. EasySCP might not have advanced server configuration features like WHM, but such things should always be done in the shell anyway.

in case you need help let me know...;)
Image

Post Reply