Migrated Wordpress Site Improperly - wrdp?

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,144
Reaction score
10,489
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)?
 
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.
 
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.
 
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.
 
Back
Top