Edit: Change post format from Aside to Status. Asides now seem to have titles, but statuses supposedly don’t.
For quite a while in the past, I was in the bad habit of uploading the media associated with my posts in a separate storage directory on the server. I didn’t even bother to categorize it much, just dumped the stuff in ad-hoc subdirectories and forgot about it.
Over time, the storage directory became unmaintainable as stuff kept piling in and it was difficult to keep track of which pages each file was associated with. At the same time the built-in media handling in WordPress became quite efficient and accessible. So I switched to using that instead.
But there was still the problem of past media, laying around in the old storage directory, uncategorized, linked to in god knows where. I began to manually fix old posts referring to the storage, but there were dozens and dozens of pages worth of posts to fix individually, so I soon grew tired.
I was planning to write some one-time code to do the per-post re-uploading, when I discovered Cache Images. I quickly realized I could exploit it to my benefit in this case: using another alias for my server I could make Cache Images re-upload each file for me.
I began with individual files to see if everything would work as planned. Turns out there was a slight cosmetic error in the upload: the files would go into the current month’s upload directory instead of the directory corresponding to the old post’s date. This was bug #16777 in WordPress’ tracker, and there was a diff file I could patch my WordPress installation with. Luckily, the patch worked just fine and now the images each went to their respective monthly directories.
There’s still the issue of WP Smush.it not working properly. I’m told that Yahoo! are in the process of switching servers, which should hopefully fix the errors I’m getting, but in the meantime I’ve disabled smushing altogether. It’s too bad, it would’ve been good to get the pictures smushed en masse while re-uploading.
404’s on post permalinks could be due to a number of different issues, but for me it was caused by a plugin gone bad during a WordPress update: Top Level Categories was broken by WordPress 3.1, and replacing it with FV Top Level Categories was the fix.
Damn it, Google, it isn’t that hard!
<?php get_option('default_category'); ?>
Libre.fm Now Playing fetches the currently playing track from your Libre.fm account and displays it in a widget, optionally linking it to Libre.fm.