Host Migration

Can't get it installed? Not sure how a feature works? Then post here.

Host Migration

Postby aiki456 » 2012-04-17 12:06 pm

I need to migrate my site (topnjbands.com) to a new hosting provider and, though I do ok with html, I'm pretty clueless when it comes to SQL and PHP.

Has anyone made this type of move before and, if so, can you tell me the specific steps I should take to ensure a successful move with minimal downtime?

Thank you,

Frank
aiki456
Advanced Member
 
Posts: 61
Joined: 2006-12-01 10:00 am

Re: Host Migration

Postby OS-Mark » 2012-04-17 07:30 pm

Sure,
1) Set your TTL to 300 to ensure fast DNS propagation. Ask your host if your not sure how to do this. This step is not required, but it minimizes delays.

2) once you have set this, wait 24-48 hours to start the actual migration. If you are unable to change this then you can start the migration anytime.

3) if you have "Cpanel" on the old host as well as the new host, generate a "full backup" and give it to your new host for them to restore from root. Then change your nameservers at your registrar and this migration is done. :) Alternatively you can also give your new host the username and password for your old host and they can use the WHM migrate site function for a usually painless migration.

4) if you dont have Cpanel, download a full dump (export) of your MySQL database, often using a tool like phpmyadmin

5) then download all the files via FTP

6) upload all the files to your new host.

7) create a new MySQL database and MySQL user with password on the new host.

8) On the new host, modify your settings_sql.php file to use the new MYSQL database name, username, and password you setup in the previous step

9) On the new host import your database file that you exported from your old host to your new empty database using a tool like phpmyadmin

10) Login to your domain name registrar and update your nameservers to your new host.

Thats it :) best of luck.
CSS / HTML / Aardvark Stuff
VisioList - A Paid Fork Of The Worlds Best Topsite: Aardvark Topsites
Why VisioList? Fast, timely support. Constant updates and improvements, modification plugins for smooth upgrades and more!
OS-Mark
Advanced Member
 
Posts: 545
Joined: 2005-05-02 01:37 am
Location: Canada

Re: Host Migration

Postby aiki456 » 2012-04-18 09:02 pm

Thank you for the response! I will attempt this in the next week or so and let you know how it went. Thanks again.
aiki456
Advanced Member
 
Posts: 61
Joined: 2006-12-01 10:00 am

Re: Host Migration

Postby aiki456 » 2012-04-22 01:25 pm

I attempted the migration and appear to have two, possibly unrelated issues.

The first appears to be some kind of DNS issue whereby my domain is now pointing to another one of my sites. This is most likely because I have a deluxe hosting account that allows me to hang multiple sites off the main site (www.defiancefightgear.com). I am going to try to get the hosting provider to help me with this one.

The second appears to be related to the SQL info. When I type in the URL for the folder containing the migrated site, I get the following...

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/a/i/k/aikidefy/html/topnj/sources/sql/mysql.php on line 32

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/content/a/i/k/aikidefy/html/topnj/sources/sql/mysql.php on line 33

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/a/i/k/aikidefy/html/topnj/sources/sql/mysql.php on line 47

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/content/a/i/k/aikidefy/html/topnj/sources/sql/mysql.php on line 47

Fatal error: Database error in "/home/content/a/i/k/aikidefy/html/topnj/index.php" on line 43

in /home/content/a/i/k/aikidefy/html/topnj/sources/sql/mysql.php on line 88

I had modified the fields in settings_sql.php so that it now appears as follows...

<?php
$CONF['sql'] = 'mysql';
$CONF['sql_host'] = 'localhost';
$CONF['sql_database'] = NewDBname;
$CONF['sql_username'] = NewUsername;
$CONF['sql_password'] = 'NewPswd';
$CONF['sql_prefix'] = 'ats';
?>

Any suggestions on how I can remedy these issues are appreciated!

Thank you,

Frank
aiki456
Advanced Member
 
Posts: 61
Joined: 2006-12-01 10:00 am

Re: Host Migration

Postby OS-Mark » 2012-04-24 01:44 am

That error means that your connection information to MySQL is not correct, verify the following settings with your host.

localhost
database name
database username
database password
CSS / HTML / Aardvark Stuff
VisioList - A Paid Fork Of The Worlds Best Topsite: Aardvark Topsites
Why VisioList? Fast, timely support. Constant updates and improvements, modification plugins for smooth upgrades and more!
OS-Mark
Advanced Member
 
Posts: 545
Joined: 2005-05-02 01:37 am
Location: Canada

Re: Host Migration

Postby aiki456 » 2012-04-24 08:52 am

Hi Mark,

You are correct! They gave me a value to replace 'localhost' and also said they had some issue with an SSL certificate. Once I made the change to localhost and they did whatever they had to do, the site was up and running again.

Thank you for your assistance!

Frank
aiki456
Advanced Member
 
Posts: 61
Joined: 2006-12-01 10:00 am


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron