Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Moving a wordpress site

Status
Not open for further replies.

mrh

Joined
May 30, 2010
Posts
530
Reaction score
11
Anyone got a list of things to check off when moving a wordpress site from one host to another?

I have moved everything across, all FTP files and SQL , changed the config file for the new database, but it still keeps trying to install a new copy of wordpress and I get the sql data to populate?

Help!
 
Are you sure you moved the database? Sounds like Wordpress is finding the database empty and trying to do a new install to create the data.
 
You can have issues with the database refering to the database at the old domain, since it's stuffed full of references to the url at the original install.

I've found the easiest way to sort out all of the problems is to run an sql command inside phpmyadmin to replace the old domain with the new one inside the database.

The page below explains pretty well how to do it:

http://thesishosting.com/topics/wordpress/moving-wordpress-installation-to-new-domain-sql
 
moving WP

OLD SITE;

1. log in to phpmyadmin - find your db and export it as gzip
2.ftp EVERYTHING in public_html to your local machine (pc)
3.take a look at the file wp-config.php & make a note of the database name and password and table prefix.

NEW SITE
1.log into phpmyadmin and create the db from the details on the wp-config.php
2. once db is created install the gzip sql file you downloaded
3.ftp EVERYTHING into public_html

Your done ;)
 
Is the old or new host not using localhost for the db location?
You will need to amend that in the config if so.
 
Code:
<?php
$dbServer1='localhost';

// username and password to log onto db server
$dbUser1='your-db-user1';
$dbPass1='yourpassword1';

// name of database
$dbName1='your_db_name1';

    $link = mysql_connect("$dbServer1", "$dbUser1", "$dbPass1") or die("Could not connect post");
    print "Connected successfully to your_db_name1<br>";
    mysql_select_db("$dbName1") or die("Could not select database your_db_name1");
    print "Database your_db_name1 selected successfully<br><br><br>";

// close connection
mysql_close($link);

// hostname or ip of server (for local testing, localhost should work)
$dbServer2='localhost';

// username and password to log onto db server
$dbUser2='your-db-user2';
$dbPass2='yourpassword2';

// name of database
$dbName2='your_db_name2';

    $link = mysql_connect("$dbServer2", "$dbUser2", "$dbPass2") or die("Could not connect your_db_name2");
    print "Connected successfully to your_db_name2<br>";
    mysql_select_db("$dbName2") or die("Could not select database your_db_name2");
    print "Database your_db_name2 selected successfully<br><br><br>";

// close connection
mysql_close($link);

// hostname or ip of server (for local testing, localhost should work)
$dbServer3='localhost';

// username and password to log onto db server
$dbUser3='your-db-user3';
$dbPass3='yourpassword3';

// name of database
$dbName3='your_db_name3';

    $link = mysql_connect("$dbServer3", "$dbUser3", "$dbPass3") or die("Could not connect your_db_name3");
    print "Connected successfully to gallery<br>";
    mysql_select_db("$dbName3") or die("Could not select database your_db_name3");
    print "Database your_db_name3 selected successfully<br><br><br>";

// close connection
mysql_close($link);

?>
Save this as test.php and upload it to your website root, run it by doing yourdomain/test.php and see if your DB is connecting. If yes, check you have the same DB credentials in your WP config file. Delete the test file when you are done.

Admin
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

Latest Comments

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom