1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Migrated Wordpress Site Improperly - wrdp?

Discussion in 'Web Design' started by Scorpion Ghost, Dec 10, 2016.

  1. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    A few days ago I migrated my Wordpress site from one Hostgator hosting to a new Hostgator hosting (same shared hosting plan).

    I believe I didn't do it properly.

    I used a Wordpress plugin called UpdraftPlus to backup the Database, Plugins, Themes, Uploads, and Others. Then I installed Wordpress on the new hosting, installed the UpdraftPlus plugin, and uploaded the stuff I backed up.

    Actually, the site was restored fully, and it seems to work fine (apart from 1 error I can't work out how to fix).

    Here's the error:

    Code:
    Warning: mysql_query(): Access denied for user '*****'@'localhost' (using password: NO) in /home3/****/public_html/*****.com/wp-content/themes/PricerrTheme/single-job.php on line 419
    
    Warning: mysql_query(): A link to the server could not be established in /home3/*****/public_html/*****.com/wp-content/themes/PricerrTheme/single-job.php on line 419
    
    Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home3/*****/public_html/*****.com/wp-content/themes/PricerrTheme/single-job.php on line 422
    
    The error occurs on the section where customer feedback is displayed. But anyway, I just thought I'd mention that error, if anyone gets any ideas on how to fix it.


    But my actual question here is about the "config.php" file for the theme, and the "wp-config.php" file for the wordpress installation. There's a difference between them, and I'm wondering if I should change it.

    Here it is (this is in config.php for the theme):

    Code:
    $db_host = 'localhost';
    $db_user = 'olduser_wrdp2';
    $db_pass = 'onepass';
    $db_name = 'olduser_wrdp2';
    
    And this is in the wp-config.php for the wordpress installation:

    Code:
    define('DB_NAME', 'newuser_wrdp2');
    
    /** MySQL database username */
    define('DB_USER', 'newuser_wrdp2');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'differentpass');
    
    Basically, the information between these two files is different. The first config shows the info from my old hosting, but the wp-config shows the info from my new site.

    Should I change the info in the first config (olduser_wrdp2) to be the same as in the second config (newuser_wrdp2)?
     
  2. ahansson89

    ahansson89 Newbie

    Joined:
    Jan 19, 2016
    Messages:
    19
    Likes Received:
    3
    There is a function in your theme that is unable to connect to the database - this is really a bad job from your theme developer. Long story short. You need to change your config.php to the new database credentials.

    We do stuff like this for our clients everyday. If you need help, feel free to send me a PM.
     
  3. webdev357

    webdev357 Junior Member

    Joined:
    Oct 18, 2016
    Messages:
    102
    Likes Received:
    10
    Occupation:
    Web Designer
    Location:
    California
    I forgot what I did last time, but what I remember was being on the hostgator live support chat, and they made my migration seemed pretty seamless.
     
  4. CenTex Hosting

    CenTex Hosting Jr. VIP Jr. VIP

    Joined:
    Nov 8, 2009
    Messages:
    1,898
    Likes Received:
    719
    Gender:
    Male
    Occupation:
    Founder/CEO
    Location:
    Austin, TX
    Home Page:
    It would have been faster if you would have just used the cpanel backup wizard to make a backup and then just restore the backup on the new account.

    Also now that you posted your login info I would recommend going and changing that just to be safe.

    Did you set up a new user in the Database wizard and connect it to the database and then update the config file with the new user and password.