• Hi,
    I am moving hosts and

    The procedure I used was to copy the old addon domain /addondomainname/ from my old host to my desktop folder, then uploaded it into the root of domain.com on my new host.

    Then I exported and imported the wrp10.gz file from within Cpanel on old host to new.

    Then edited the wp-config.php and changed the username, dbname and password.

    Unfortuately WP then requested I run the install.php again. And things are back to the hello world post…

    Where did I go wrong?
    I’ve reimported the db with no luck.

    Then I tried using the tutorial here:
    http://www.tamba2.org.uk/wordpress/restore/

    Still no luck. I get this error in PHPMyadmin:
    #1064 – You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘DEFAULT CHARSET=latin1’ at line 10

    Then once again WP asks me to rerun the install.php when I go to the site which reverts me back to a ‘hello world’ post with nothing else…

    I’m using a different cpanel(host) username and password totally for these. So how can I totally realign the db in a case like this?

    All help would be greatly, greatly appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m fairly new to WP myself, but encountered a similar issue when I uploaded my WP site from my local development environment to the live server.

    The one thing I discovered is that a lot of the settings are kept in the database itself. So once you have restored your backup database into the new location, you have to make a few modifications. If you have access to phpmyadmin, that’s probably the easiest way. I’m at work now so can’t check the exact table name, but I think it’s wp_options. If you browse through that table, you’ll see a few of the places where you have to change things.

    I think you’ll find it relatively obvious which lines to change (url, etc).

    You may also want to look at your root’s .htaccess file and make sure it reflects the right url.

    And then, as you’ve pointed out already, make sure that your config file shows the right database, username, and password. Be aware that a lot of hosts append your webhosting account name in front of database name and username, so if your hosting account name is “bozo”, and your database name is “clown”, the database name is “bozo_clown”. Same for username. It’s a wee thing often overlooked when going from one host to another.

    HTH

    Thread Starter rational

    (@rational)

    Thank you so much for your response. It got me much further along. I now only have to figure out what all those strange characters are appearing on my page.

    I was able to drop all tables then import my database, but only after deleting DEFAULT CHARSET=latin1′ from about 5 spots in my database file.

    My page is at http://www.daveelger.com if you’d like to take a look and see what I’m talking about as far as strange characters goes.

    Here’s an example:

    “1.      When athletes…”

    or

    “in the evening.  Follow this pattern for a few days and guess what? You’ll be a 3 or 4 pounds light!It’s a common misconception that…”

    I have to believe this is a difference in character sets between the hosts. E.g. my old host (Hostgator) and my new host (MyriadNetworks). Perhaps Hostgator is asian based and so using asian character sets? (utf8 perhaps?). I’m not sure. If they are, I wonder how to revert back?

    I guess for now I’ll just go into each entry and clean them up. It’s fortunate I only have about a dozen posts right now on the old one. If I had hundreds this would be a different story and I’d definitely need a fix.

    Well, hopefully someone will still answer this for the next guy who has this very same issue. Please answer now if you can as I’m very interested in the answer.

    Regards,
    Dave

    Thread Starter rational

    (@rational)

    I found only two answers in other posts on this issue:
    MySql Bug: http://wordpress.org/support/topic/55282?replies=14#post-303707
    “escdotdot
    Member

    well, I have a solution to my prob. Apparently it’s a bug with mySQL 4.1

    This post on another forum gave me the answer.

    All I had to do was add the line:
    mysql_query(“SET NAMES ‘utf8′”);
    to the file /wp-includes/wp-db.php right after line 43 (where it makes the database connection).

    This fixes posting and retrieving posts with accented characters. But I now have to go back through my posts and retype many of the accented characters (and some quote marks) as they seem to have permanently changed into different characters.”

    AND:
    “podz
    Support Maven

    It’s a character encoding problem.

    Try this (I’m assuming you are on Windows)
    Download and install notepad++
    notepad-plus.sourceforge.net/uk/site.htm

    Use that to open your sql file
    Find a faulty character – just check what it looks like
    Now Select All
    Then from the Format menu, choose ‘Encode in UTF-8’
    If there is a change to the faulty character, the sql file is wrong
    If there is not a change the new db is wrong

    If the sql file is wrong, Save the newly encoded sql file and re-import.

    If it’s the db, post back and we’ll see how to move forward.
    Posted: 2005-11-23 11:24:21 # “

    The first one didn’t really help as having to go back and cleanup the posts by hand is exactly what I’m trying to figure out how not to do. But this is what got mine fixed for now. Lucky I didn’t have hundreds of posts.

    Answer two looks interesting though.

    Anyone have the “final answer” to how to revert the database back to clean characters?
    Dave

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Moving Hosts – best practice procedure please’ is closed to new replies.