Ubuntu 12.04 LTS on Bytemark VM

If, like me, you can’t wait for Ubuntu 12.04.1 to be released, you can force an upgrade of your favourite OS OS.

If you are going from the previous LTS 10.04, then the -d is important. Otherwise there would be no upgrade to offer.

The upgrade process should go smoothly enough. Except for when it comes to the kernel.

Bytemark VM’s make use of kernels that sit outside of the VM itself.

I didn’t realise this until I tried to fix syslog doing this:

Even if you update grub, it’ll be ignored. Instead, follow the instructions here: http://www.bytemark.co.uk/support/technical_documents/kernelchange?tags=VirtualMachine

At the time of writing, I chose 3.2.0-kvm-i386-20110111 as it’s fairly close to the kernel being used by other Ubuntu 12.04 machines I have.

Your mileage may vary, but I hope this helps somebody else with the same trouble.

Updating a WordPress database with new domain details

Further to my original quick db update queries, I found the need for a more in-depth approach.

A WordPress site my father works on has weekly backups, but he wanted to see that they actually worked.
To do so, I set up a subdomain vhost on my bytemark server and set about getting the back to work with it.

One of the most annoying/lazy/strange things about WordPress is that it uses serialised arrays within database fields. This makes a simple search and replace fail if you need to do anything more than update the two fields here.

This script works for the database set-up for my father. It may require further tweaks if additional plugins store absolute paths or URLs.

It also could do with a heavy dose of refactoring, but it works for my needs at this point in time 🙂