Wordpress Upgrade
Sunday, March 30th, 2008I am currently enjoying the visual refresh Wordpress has been given in version 2.5. Its quite cool.
I am currently enjoying the visual refresh Wordpress has been given in version 2.5. Its quite cool.
Merry humbug to everyone who believes that some bloke called Jesus was born 2007 years ago today, Merry Christmas to others who joins in the madness just because its ‘easier’ that way. Christmas is overly commercialised nowadays and has lost its religious meaning, boo-hoo. Any how it is two years since I started this little blog as a trash can for the crap that accumulates in my head, although apparently some of it is useful to others. Enjoy the festive period, as it means a lack of work and academia for some variable period, in my case 4 weeks. *grins*
I have made the decision to disable Akismet, after reading some hype about the new Wordpress 2.3’s plugin version check API, which turned out to be negative but reveals something interesting with regards to Akismet. The following code is taken from the official Akismet plugin for Wordpres.
$ignore = array( 'HTTP_COOKIE' );
foreach ( $_SERVER as $key => $value )
if ( !in_array( $key, $ignore ) )
$comment["$key"] = $value;
$query_string = '';
foreach ( $comment as $key => $data )
$query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';
$response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);
The bit that worries me is the use of $_SERVER, the only item from this array not sent is HTTP_COOKIE, fair enough. But why do you need to know the full paths to the files on my server and other server environment variables Akismet? I do not have a problem with sending data to Akismet, just not this data!
I have upgraded to Wordpress 2.2.2, again using a patch. I have put together a page on patches for the benefit of others.
I have been away from my blog for quite a while, general laziness on my behalf. I’ve been fairly ‘busy’ by my own standards working part time, doing some project work, playing games, sleeping and socialising. My summer is panning out quite nicely, and I am now wanting to return to Exeter for my second year, the sooner the better. I am just about to apply the Wordpress upgrade that has been released in my absence, and reading the dumper truck load of e-mails that I have received. Fun.
I don’t get people who moan about upgrading web software, I suspect these are all fairly dumb people who do not have or know how to use terminal access to their server. I just upgraded Wordpress from 2.2 to 2.2.1 in 5 minutes, patch for anyone else like me with brains.
I have uploaded the photos me and my friend took whilst driving the journey from Gateshead-upon-Tyne to Lancaster, via the Hartside Pass and the Lake District, quite a few desktop wallpaper photos in the bunch.
I decided to convert my blog to use UTF-8 rather than Latin-1 as its character set, this turned out to be somewhat of a PITA. After changing all the table and database character sets manually I had to convert the data. Eventually settling for this little terminal magic.
mysqldump --default-character-set=latin1 --add-drop-table cs278_blog | sed 's/SET NAMES latin1/SET NAMES utf8/' | mysql cs278_blog
I redumped the data afterwards and checked it over with iconv which found nothing to complain about. I found how to do this here.
Wordpress 2.2 aka Getz has been released, once again I performed an upgrade using Subversion generated patches, which had one small problem. They changed the background images in the default style so I had to manually wget them from subversion.
cd wp-content/themes/default/images
wget http://svn.automattic.com/wordpress/tags/2.2/wp-content/themes/default/images/kubrickbg-{ltr,rtl}.jpg
rm kubrickbg.jpg