0
votes

I have been tasked with transferring a WordPress website from a test server (Linux server) to the client's own server (Windows 2012 server).

So far so good as I have transferred the files and created the new database to go with it. Also updated the wp-config.php file to include the new database info.

As per documentation I have read elsewhere, I changed the DB_HOST in the config file from 'localhost' to the IP address of the new server.

When I try to load the website I get the following error:

Notice: Use of undefined constant DB_HOST - assumed 'DB_HOST' in D:\inetpub\wwwroot\website\wp-includes\load.php on line 350 Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\inetpub\wwwroot\website\wp-includes\wp-db.php on line 1482 Warning: mysql_connect(): [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. (trying to connect via tcp://DB_HOST:3306) in D:\inetpub\wwwroot\website\wp-includes\wp-db.php on line 1482 Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\inetpub\wwwroot\website\wp-includes\wp-db.php on line 1482

I can't make sense of it! Can anyone help?

I should mention that phpmyAdmin and mySQL are installed and apparently correctly set up on the Windows Server.

Thanks in advance!

1
Can you post the exact line where you assign DB_HOST? Also, what version of WordPress, MySQL, etc. - Joel C
Hi Joel C, the exact line is '/** define('DB_HOST', '78.137.113.80'); */' Wordpress version is 4.3.1 - soozet
From your paste, it looks like the whole line is commented out with the /* and */ on either end. Can you try removing those marts at each end and see if it works? - Joel C
phpmyAdmin Version: 4.0.10.7 - soozet
@JoelC yes! But now I'm getting another error - "Warning: mysql_connect(): Access denied for user 'user'@'id22253' (using password: YES) in D:\inetpub\wwwroot\website\wp-includes\wp-db.php on line 1482" - soozet

1 Answers