WordPress difficulties- wp-config.php [SOLVED]

  • SumoMe

I installed WordPress, which you are now reading, from my hosting provider’s Application Vault, and it worked beautifully, but, I wanted to use nice permalinks, which is not possible, if you have installed in this way. This was confirmed, impressively quickly, by Blacknight technical support guru Nils.

So, I installed it manually, and made a daft error, which I recount here, for the instruction or amusement of others.

WordPress configuration, from the users perspective, is done through the file ‘wp-config.php’ file, which you must create when installing manually, by editing the supplied wp-config-sample.php file. The pertinent bit is :-
/** The name of the database for WordPress */
define('DB_NAME', 'dbname');

/** MySQL database username */
define(‘DB_USER’, ‘user’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘password’); [[This isn’t my password..]]

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

which doesn’t work.

The error is the last line
/** MySQL hostname */
define('DB_HOST', 'localhost');

This is is in the sample file, and several bits of WordPress documentation say things like – ”leave this as ‘localhost’ for 99% of hosting suppliers out there”. However, Blacknight, and many other hosting providers keep their MySQL databases on a different server to the webservers, and so provide an internal hostname, which is what needs to go in the DB_HOST line.

In my case it is :-
Internal hostname: mysql496int.cp.blacknight.com

So the lines in wp-config.php should read

/** MySQL hostname */
define('DB_HOST', 'mysql496int.cp.blacknight.com');

which does work.

Simple when you know how…

Leave a Reply

Your email address will not be published. Required fields are marked *