Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Moving Wordpress to a new host.

  1. #1
    Join Date
    Jul 2009
    Location
    Iowa
    Posts
    40

    Default Moving Wordpress to a new host.

    The solution is probably staring me in the face, but for now it eludes me!

    I am moving one of my blogs to a new host. For some reason, I can't get it to connect to the database. As far as I can tell, I have setup the wp-config file correctly to match the user and password in mysql.

    I get the following error message:
    Error establishing a database connection
    Here is what I put in my wp-config file:

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'accountname_dbname');

    /** MySQL database username */
    define('DB_USER', 'accountname_username');

    /** MySQL database password */
    define('DB_PASSWORD', 'password');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    If you don't see anything wrong with those settings, here are some other questions:

    1. When I go into phpMyAdmin, it says the user is username@localhost. I tried just using the username in wp-config, but that didn't work either. Is there a way to test the mySQL login outside of Wordpress?
    2. Do I need to get new Authentication Unique Keys for this blog on the new host, or can I use the old ones?
    3. Any other questions?

    Thanks, Mike

  2. #2
    Join Date
    Jul 2009
    Location
    Vermont
    Posts
    154

    Default

    Have you actually filled in the values on your end? I assume this code is just to show us the code structure...
    WordPress training, custom web design & development, web marketing consulting www.sproutnewmedia.com

  3. #3
    Join Date
    Jul 2009
    Location
    Iowa
    Posts
    40

    Default

    Yes, the correct values are filled in.

    Thanks, Mike

  4. #4

    Default

    I'm not sure who you're hosting with (new host) but I know with HostGator you can ask these types of questions with their online chat support and they can usually fix it for you in a matter of minutes. Try that and see if your host can do a quick fix so you can move forward.
    Lynn Terry
    Site Admin

    Join us on the Internet Marketing Blog at ClickNewz.com!

    New! Niche Success Blueprint "Start to Profit" Step-by-Step Training

  5. #5

    Default

    Try renaming the wp-config file to something else, say wp-configold and then recreating it by opening wp-configold in notepad and saving as wp-config and uploading to your server.

    I have just moved a couple of blogs to a new host and had to go through this, so it might help

  6. #6

    Default

    I may be confused by the statement, "it says the user is username@localhost," but did you actually try username@localhost as the DB user?
    Last edited by lindastacy; November 2nd, 2009 at 02:23 PM. Reason: To clarify

  7. #7
    Join Date
    Oct 2009
    Location
    Ballarat, Vic, AU
    Posts
    17

    Default

    On the hosting account that you moved to did you remember to give the user access to the database after you created the database and user?

  8. #8
    Join Date
    Jul 2009
    Location
    Iowa
    Posts
    40

    Default

    Linda, I only put "username" in the description to obscure the true user name.

    Gary, Yes, I gave the user all access to the database.

    Baggs, I'll try your trick of re-creating the wp-config file. Perhaps it is corrupt in some manner.

    Lynn, It is hosted with my reseller account from Hostgator. I will try their support today as well.

    Thanks, Mike

  9. #9
    Join Date
    Aug 2009
    Location
    Upstate NY near Rochester
    Posts
    753

    Default

    I recently had my annual fee come up for a host that I like, but not as well as hostgator, which I also have. I thought about moving it over, but with everything else going on, it wasn't worth the hassle! Each time I mess with my blog, it winds up down until I get someone to fix it. That's what happens when you are non-techy!

  10. #10
    Join Date
    Jul 2009
    Location
    Iowa
    Posts
    40

    Default

    Quote Originally Posted by StephenT View Post
    That's what happens when you are non-techy!
    It even happens when you are a techy!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •