WordPress 2.6 added post revisions as a new feature that is turned on by default. In an earlier post, I described how you could control this by editing wp-config.php and there are a number of plugins that purport to provide the same level of control through the administration screens. Even so, I decided to look at things from the housekeeping side of things and create my own plugin for clearing the database of revisions at one swoop. Currently, it takes out all revisions but I am thinking of adding the facility for selecting which revision to keep and which to delete. It goes without saying that you should back up your database first in case anything might go wrong.
Archive for July, 2008
Getting VirtualBox working on Ubuntu after a kernel upgrade
In previous posts, I have talked about getting VMware Workstation back on its feet again after a kernel upgrade. It also seems that VirtualBox is prone to the same sort of affliction. However, while VMware Workstation fails to start at all, VirtualBox at least starts itself even if it cannot get a virtual machine going and generates errors instead.
My usual course of action is to fire up Synaptic and install the drivers for the relevant kernel. Looking for virtualbox-ose-modules-[kernel version and type] and installing that usually resolves the problem. For example, at the time of writing, the latest file available for my system would be virtualbox-ose-modules-2.6.24-19-generic. If you are a command line fan, the command for this would be:
sudo apt-get install virtualbox-ose-modules-2.6.24-19-generic
The next thing to do would be to issue the command to start the vboxdrv service and you’d be all set:
sudo /etc/init.d/vboxdrv start
There is one point of weakness (an Achilles heal, if you like) with all of this: the relevant modules need to be available in the first place and I hit a glitch after updating the kernel to 2.6.24-20 when they weren’t; I do wonder why Canonical fail to keep both in step with one another and why the new kernel modules don’t come through the updates automatically either. However, there is a way around this too. That means installing virtualbox-ose-source via either Synaptic or the command line:
sudo apt-get install virtualbox-ose-source
The subsequent steps involve issuing more commands to perform a reinstallation from the source code:
sudo m-a prepare
sudo m-a auto-install virtualbox-ose
Once these are complete, the next is to start the vbox drv as described earlier and to add yourself to vboxusers group if you’re still having trouble:
sudo adduser [your username] vboxusers
The source code installation option certainly got me up and running again and I’ll be keeping it on hand for use should the situation raise its head again.
Another alpha release of Ubuntu 8.10 is out
It’s probably about time that I drew attention to Ubuntu’s The Fridge. While the strap line says “News for Human Beings”, it seems to be the place to find out about development releases of the said Linux distribution. Today, there’s a new alpha release of Intrepid Ibex (8.10) out and they have the details. As for me, I’ll stick to updating my 8.10 installation using Synaptic rather than going through the whole risky process of a complete installation following a download of the CD image. Saying that, it would be nice to see the System Monitor indicating which alpha release I have. I didn’t notice anything very dramatic after I did the update, apart maybe from the hiding away of boot messages at system startup and shutdown or the appearance of a button for changing display settings in the panel atop the desktop.
Controlling the post revision feature in WordPress 2.6
This may seem esoteric for some but I like to be in control of the technology that I use. So, when Automattic included post revision retention to WordPress 2.6, I had my reservations about how much it would clutter my database with things that I didn’t need. Thankfully, there is a way to control the feature but you won’t find the option in the administration screens (they seem to view this as an advanced setting and so don’t want to be adding clutter to the interface for the sake of something that only a few might ever use); you have to edit wp-config.php yourself to add it. Here are the lines that can be added and the effects that they have:
Code: define(‘WP_POST_REVISIONS’,’0′);
Effect: turns off post revision retention
Code: define(‘WP_POST_REVISIONS’,'-1′);
Effect: turns it on (the default setting)
Code: define(‘WP_POST_REVISIONS’,’2′);
Effect: only retains two previous versions of a post (the number can be whatever you want so long as it’s an integer with a value more than zero).
Update (2008-07-23): There is now a plugin from Dion Hulse that does the above for you and more.