Friday, 9 September 2016

mysql - Moving WordPress from Linux to Windows Server 2012 - database issue

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!

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...