Google webmaster tools and wordpress

I wanted to set my site up on Google webmaster’s tools. Google offer two choices, one is to put a meta tag, with defined content, in the header of the index page. This would require programming with PHP which is a little beyond my scope. The alternative to is to download a html page, provided by Google, and put it in your website. The page is actually 1 line of text, so it’s not really html.

The obvious way to do this is to add a page with WordPress, as advised, for example, on Jalal P. Jha’s blog. Obvious, but wrong. Jalal’s advice applies, as he says, to sites hosted on WordPress.com, not to self-hosted sites, such as this. It’s possible to create a WordPress page with the correct title, but WordPress adds in a lot of invisible bits and pieces, which alter the contents of the file, which is what Google checks.

So, the solution is very simple, use ftp, to add the page provided by Google, to the right directory on your web host, in my case the root directory of this website, (/website/httpdocs/astaines) and you are done.

WordPress difficulties- wp-config.php [SOLVED]

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…