WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Move to a new host problem (8 posts)

  1. anefarious1
    Member
    Posted 2 years ago #

    Hello,

    I am trying to move http://www.martiallawusa.com to my host. I had the previous owner send me the SQL and a GZIP of the entire folder in his cpanel.

    1. When he pushed me the domain I added my nameservers (4 nameservers now) about 14 hours ago.

    2. Then I uploaded the GZIP via FTP to my host after creating an addon domain.

    3. Then I created a new database in my cpanel. Then I imported the SQL via phpmyAdmin in my cpanel.

    4. Then I went into the wp-config file and changed the DB name, DB user, password.

    As you can see the site only pulls up the main page but when you click on something it says, "Error establishing a database connection" and this is for even the back-end login (wp-login)

    Should I take away the old nameservers and see what happens?
    thanks so much!

  2. anefarious1
    Member
    Posted 2 years ago #

    I should add that I added full permissions to the user for the new database so that isn't the problem. Thanks!!!

  3. anefarious1
    Member
    Posted 2 years ago #

    The main page no longer even shows up and everything now says, "Error establishing a database connection"

  4. Eric Hoanshelt
    Member
    Posted 2 years ago #

    Hey Anefarious1,

    Are you positive you changed the wp-config.php credentials to the correct values? I would double check just in case.

    Also, are the table prefixes the same in the new database as the wp-config.php file specifies?

  5. anefarious1
    Member
    Posted 2 years ago #

    Hi Eric,

    Thanks for assisting. The table prefix was kept default at wp_

    I only know of that one further down the bottom of the wp-config file. Are there others to look for?

    As for the credentials in the wp-config.php file.. yes I've checked it and since I left the name of the database the same.. I just had to rename the first part of the file to my hosting name XXXXXXXX_SAME. And I used an existing DB name which I assigned to the DB and the same password. Maybe I should create another DB name and password and try that?

    What else could it be? Thanks!!!

  6. anefarious1
    Member
    Posted 2 years ago #

    I see what you are talking about in the phpmyadmin about the table prefixes.. yes they are all default wp_

  7. anefarious1
    Member
    Posted 2 years ago #

    I created another username and password, assigned it to the DB w/ full permissions, then edited the wp-config.php file to reflect that and now it works. I guess you cannot assign an existing username to a newly created DB? Can anyone confirm that? Thanks

  8. Eric Hoanshelt
    Member
    Posted 2 years ago #

    You can but you have to do that via cpanel also. I believe where you can create a new user and database, there is a form all the way at the bottom that allows you to apply users to databases

Topic Closed

This topic has been closed to new replies.

About this Topic