Archive for the 'Slickhouse' Category:


24 hours of downtime


I knew it was coming, but didn’t know exactly when…

Virgin Media are in the process of transferring the account to myself, part of which involves temporarily switching off the broadband connection, whilst they then setup a new connection in the new account holder’s name.

Fortunately their Customer Services are very helpful and knowledgeable - who during the first call confirmed that the broadband had been disconnected. The second call involved them updating the information for the cable modem, which required the MAC address.

So, everything is up and running again and the back-log of my emails are slowly creeping in. We’re going to upgrade the account soon to the triple XL, which includes 20MB broadband amongst others. I’ll let you know if doubling the speed makes any noticable difference.

WordPress 2.5.1 RSS feed bug


Users of WordPress who have recently upgraded to version 2.5.1 should double check their RSS feeds! It’s taken me nearly 6 weeks to spot that my Google Reader hadn’t updated with the latest entries/comments from slickhouse.com!

Knowing that plenty of comments and a handful of posts had been made after May 1st, I started looking for the cause of the problem. Initially I thought it was due to the move from my shared Linux hosting to dedicated Windows hosting (at slickhouse). However, trawling through server logs showed that slickhouse had migrated long before then.

The next step was to work out what files (if any) had changed. Unfortunately 4 things occured at the start of May - upgrading to the version 8 theme; moving MySQL to another dedicated server; updating the permalinks within the database and upgrading to WordPress 2.5.1

A few Google searches later (after exhausting the first 3 things) found that many others had experienced problems with their RSS feeds after upgrading to version 2.5.1 - a bug that to this day still appears to be un-fixed.

However, there is a solution. You need to update all links to your RSS feed from /wp-rss2.php to /feed/. For the comments, /wp-commentsrss2.php becomes /comments/feed/ - much friendlier! If you’re using Feedburner (highly recommended) then you’ll also need to update the URL to your feeds within your account.

Within the WordPress PHP theme code, you can call these links using:

<? php bloginfo('rss2_url'); ?>
<? php bloginfo('comments_rss2_url'); ?>

This is a temporary solution until the WordPress development team come up with a fix to the bug, however many may switch to these URLs permanently for their RSS feeds, or at least until they break again. Let me know if you too have encountered empty feeds. And for those wanting to subscribe to the slickhouse.com feeds - links are in the top-right (hover your mouse over the RSS icon).

The Summer House


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…

Jump to the last reply!

Updating WordPress Permalinks


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:

admin

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.

sql

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):

Use [database-name]

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:

post

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:

url

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.

New Theme!


This evening I’ve put version 8 live on slickhouse.com - a theme that has taken several weeks work to put together. You’ll notice a few key differences, the most prominent of which is the extra width - the site now fits to the more common resolution of 1024 x 768.

I’ll be fixing any issues that crop up over the next few days, however I would also appreciate any feedback - what do you really think?

Oh, and if you’re looking for the lounge, it’s in the top-right.