Tonight we met my grandparents in a pub for a catch-up meal, as they were staying in the area. This meant that we missed our usual Wednesday evening ritual - The Apprentice, Tuesdays @ 9pm on BBC1.
Luckily, BBC's iPlayer makes the unmissable, unmissable. So, a few minutes after it had finished on BBC1 (just as we returned from the pub), I turned on the wireless laptop and we were able to watch the full episode in full-screen glory. No installations or 3rd party programs, no active-x controls or scripts, just the usual Flash 9, as per YouTube.
I have to admit that it's the first time I've used the iPlayer - though Anneka and Emily have used it countless times recently, to watch programmes they'd missed. The quality is good and consistant, though there was visible tearing and stuttering from time-to-time. I think this is due to the limitations of streaming Flash media, rather than bottlenecks in the 10MB cable broadband, or the wireless connection.
So, if you're going to miss, or have already missed a BBC TV programme - then catch up with the unmissable via the highly recommended BBC iPlayer. We're going to use it again next Wednesday for The Apprentice, as we've already booked tickets to go and see Sex and the City.
Oh, as for tonight's episode of The Apprentice - we were shocked that Alpha won, as their advert and packaging looked horrid, but Rennaissance missed one minor point - their ad contained no mention of the product that they were trying to sell. School boy error #1.
As The Lounge is becoming full (464+ comments) and summer is pretty much here, I think we should move conversation outside into the sunshine. Hence, The Summer House. Feel free to talk about anything, as before...
Normally I'd mention this in the lounge, if at all. But after watching the trailer, I'm very impressed:
Out towards the end of summer, I can see it being one of the bigger, if not the biggest films this year. And I can't wait...
After ironing out all of the bugs with my latest theme release, I decided to update the permalinks used throughout slickhouse.com
Thanks to WordPress' intuitive admin interface, this is a simple process:
Most WordPress users opt for the Day and name Permalink structure, which would appear as 2008/05/04 for today. However, to a search-engine spider, this already looks like the links is 3 directories deep, before it even gets to the post title itself.
To counter this, I've amended the permalink structure to mirror the ISO 8601 standard for date (minus the time) - so today reads as 2008-05-04. To a search-engine spider, this would appear as just the one directory, within which the post title is situated.
There is a downside to amending permalinks to a WordPress blog that has been live for several months (even years) - all of the current links will effectively be broken. You could use a redirect script, that detects the user is trying to visit an older page - which would redirect them with a 301 (permanently moved) redirect to the amended url. However, this would still mean that your older links are present in your data.
To resolve this, you can amend all occurences of the older permalink to the new format. So, you'd look for 2008/05/04 and replace it with 2008-05-04.
Using MySQL Administrator Query Browser, you can query the WordPress database, as above. The first step is to ensure you're querying the correct database (essential if you have multiple databases on the one server):
Where [database-name] is the name of your WordPress database. A standard install usually prefixes the database name with wp_. Execute the above and you'll see the correct database highlighted in the right-pane. Next, you want to begin searching for posts which contain the old permalinks within the content:
Select ID, post_title From wp_posts Where post_content Like 'example.com/2008/%' Order By ID Desc
If your WordPress database is fairly small (<500 posts), then you should find that the above query executes almost instantly - leaving you with a list of all posts that use the older permalink structure. You'll need to replace example.com with your domain name and run the query several times - once for each year your WordPress blog has been active, amending the year each time (2007, 2006 etc.).
Once you've got your list, you can start editing the posts to update the permalinks used. This could be achieved using SQL, but I would recommend doing it post-by-post to save any headaches if your update query goes horribly wrong!
Using the WordPress admin (Manage > Post) you can edit each post using the HTML view:
After editing a few, you'll soon quickly spot the a tags, ready to update them. In my case, it was simply a case of replacing the / with -, so 2008/05/04 became 2008-05-04.
There was a reason the SQL query brought back both the ID and post_title - as you'll soon find out when trawling through the admin. The admin orders (by default) the posts by ID, which means ordering the results of the Select query should make finding the offending posts a lot easier. To make things even simpler, you can amend the URL each time you have finished editing the one post and are moving onto the next:
As you'll see - the post.php references the posts by their IDs.
Once you've updated both your permalink structure and your content of each post, you'll be left with a fully working site. However, you may also want to notify the major search engines of your recent update. For this, I can highly recommend the XML Sitemap plugin for WordPress. After setting it up, it will generate an XML Sitemap of your WordPress blog and simultaneously notify each of the search engines of the updated sitemap.
Then, it's just a case of sitting back and awaiting the spiders as they begin to crawl your new, friendlier (in theory) permalink structure. If you haven't already setup Google's Webmaster Tools, then now is a good time - as it will help diagnose any issues with your new permalink structure.
Finally, if you don't have direct access to your WordPress database, then you could try using the built-in search facility, as seen in use on many themes. Simply search for your older permalink structure and it should disply all relevant posts.