How to migrate from Movable Type to Wordpress

With 1 Comment »

After migrating from Movable Type to Wordpress I guess I should describe the experience and give some tips. Yeah, in the end I didn’t even need to switch, but as seen as I have I may as well stick with it. If I come to loath it I’ve still got the MT database.

Installing a fresh installation is a piece of cake, as long as the php code has read/write access to the directory you plonked it in, which shouldn’t be an issue on shared hosting providers. You just visit index.php and click a bizarrely obscure link that tells it to setup the config file for you automatically. The link is labeled something like “ah ok, go ahead and do it…i guess”. Which is a strange thing about wordpress, lots of the labeling and literature is written as to be “hip”. It’s all quite silly.

Anyway once the obvious things have been done, you should install the following plugins straight away, before you import any entries. You install them by plonking them in wp-content/plugins and then visit the plugin page on the dashboard and click “activate” against the plugin.

Underscore Permalinks: Wordpress replaces spaces with hyphens when creating the permalink, whereas Movable type used underscores. This plugin makes wordpress do it in the movable type style, this is all part of keeping your links the same as MT had them.
Ultimate Tag Warrior: If you want tagging support this will do the trick.

Once you have activated Underscore Permalinks you can continue, visit your MT installation and export your stuff. Back to WP, go to import on the dashboard, choose the movable type option and follow the instructions. After this, you need access to your SQL database using something like PHPMySQL, do you know what your MT installation was capping your basenames to? Some MT installs were making the basenames 15 characters, mine seemed to have been making them 30 characters, if you don’t know, visit your MT blog, go to one of your entries that had a really long title and see what the URL was capped to, count the letters. When you know, run this SQL on your WP database…

UPDATE wp_posts SET post_name=SUBSTRING(post_name,1,15);

Change 15 to whatever yours was capping them to. Now back in the WP dashboard go to Options and then Permalinks and change custom to this…

/%year%/%monthnum%/%postname%.html

You’ll no doubt cotton on to what that did so change it as necessary if your MT wasn’t generating the entries in the same place as mine was.

No doubt, your feeds are now in a different place as they were on MT, and now all the people who were reading your blog with an RSS reader are going to think you’ve fallen silent. I had trouble fixing this, I had problems with some of the htaccess rewrite rules worked on my local machine but not on the remote machine. In the end all I got to work was this, which isn’t quite as transparent as I wanted, they tell the browser/reader to redirect to another page…

RewriteRule ^atom\.xml /wp-atom.php [R=302,L]
RewriteRule ^index\.xml /wp-rss.php [R=302,L]

Add these 2 after “RewriteEngine On”, in the .htaccess file (wordpress will have created one if you didn’t have one already). Oh, .htaccess is hidden by the ., some ftp clients will have to told to display hidden files.

I wrote a php script for converting the tags which are now built into MT 3.2 to WP’s Ultimate Tags Warrior plugin. Well I say convert, for this script to work you need both the MT database and WP database accessible from the server. And I don’t guarantee it to work. Edit tempmigtags.php (nicename) find, //change these, and work out what you need to change them to, if you can’t work it out, it’s probably best you don’t run it. Download tagmigrate.

Converting your MT’s templates to work with WP is complicated. And well you’ll just have to work it out yourself. Sorry.

UPDATE: Actually I’ve just discovered Ultimate Tag Warrior has the option of doing the meta keywords itself. So you don’t need Tags in the Head.

MT Pick n Mix

With 1 Comment »

Neil, the little scally-wag is asking the world what MT Plugins they have installed. As i’m a earth-bound MT using person I guess I should join in…

BigPAPI
Allows other plugins to run-amock all over your MT interface.
MT-Enclosures
For podcasting. Scans the entry for media files and adds the relevant enclosure fields to the webfeed.
mt-relatedentries
So you can show peeps a couple of similar blog entries based on the entries tags
Gravatar.pl
Displays your ugly mug next to your comments
TechnoratiTags.pl
Embeds entry keywords into an entry in such a way as to be read by technoratis bot
OpenID Comments
So you can log in to my site with your openid, bet you didn’t even know you had one
Tags
Converts keywords to tags, actually it converts them to sub-categories. Forgotten why that’s a good thing now.

That’s a point, i still haven’t styled definition lists.

Pigs do have ears you know

With No Comments »

I’ve replaced the Stupid page with a Podcast page. I know the Stupid section was pretty irreplaceable to some of you ppl, don’t worry you can still get to it here, haha. Actually, I’ve made a bit of a pigs ear of the podcast design, well that banner doo-dar. What was I thinking? It’s barely readable. Ah well, if I wasn’t so lazy i’d clean it up a bit. I registered my podcast with Apple so that I could add a Subscribe in iTunes linkette, this means that someone at Apple has heard my god awful music. Haha, I feel so ashamed!

I’ve been giving some thought as to what would be the best language to write a new app in with regards to it being cross-platform. There are so many variables to consider that it has sent my head spinning. I’m going to have to jot down the pro’s and con’s some time. Hmm, I started writing this paragraph and then decided I feel too exhausted to go into detail. lol I’m not going to delete it though because I don’t like to be wasteful, our worldly resources are finite you know.

I went to my second poofter club yesterday. It’s funded by the NHS, did I mention that? And this is what all them taxes are going towards, we spent the whole time sat around talking about how annoying it is when you order stuff online, things like the postmen not giving you enough time to even run down the stairs. Haha, something tells me this is going to take some time.

Yawn meter

With 1 Comment »

So one of the first thing’s I do of a morning is to wake up the mac and check bloglines, in the hope that the sooner i do that and catch up on the gossip the sooner I can get on and do other things. There’s getting to be too much of the damn stuff though and i’m not sure what the reason is, partly I suppose it is that I keep adding more blogs to my feed without taking some of the oldies out, but also I think the blogs such as boing-boing and gizmodo with their multiple contributors are just writing way too much these days. They go on and on and on. I think there should be some way of filtering out posts, maybe by tag, say choose on bloglines not to have any posts that are talking about microsoft in your feed. A rating system might be an idea as well, although that would be very difficult to implement, it could involve a 5 star rating against each blog post and each time you rate a post it’s sent to some kind of central service such as technorati, and then when you RSS Reader collects todays feeds it can check each post against the ratings at technorati and bin any that are below 3 stars. Well, i dunno, it’s an idea.

Fruit Salad

With 1 Comment »

Itch and be Merry Design jan 06With it being a fresh new near it’s nice to give a site a new look. And so, as of today may I present you with my new design, which i’ve entitled “Black-Jack? You’re a Fruit-Salad!” What it all boils down to is a load of arsing around in illustrator. I’ve discovered clipping masks lol. Once I’d finished in illustrator and it was all ready to be html’d up it all went very smoothly indeed, I dunno how but i didn’t have to do much more that drop the new images in. The only problems arose when I came to try it in IE, which I left to after I’d already uploaded it …of course *slaps head*. There were some weird problem with it not allowing me to have a div with a height of 14px. Which was odd, I had to add some height to the white border right at the top, effectively bringing the whole page down a few pixels. Anyway, only problem I know of now is some strangities with the fruit-salad bubbles, which are supposed to be just under each post’s title, but IE seems to prefer sticking them all over. Nice.

There’s a ’switch to small screen edition’ link at the top. I haven’t enabled it yet, that is, I haven’t looked how to do it yet. lol

All in all, this design is a far cry from the black and white affair I had last year. Gosh, I do enjoy designing sites when I have all the freedom, is that sad? haha

Mark Gilbert

With 1 Comment »

I’ve been messing with tags again today, removing the more pointless ones from entries and removing spaces from those with multiple words. Also, strangely it seems that MT-Tags does actually add keywords as a sub-catagory of “tags”, even though when I first installed it I ended up with a million and 1 primary catagories. So i’ve tidied that up now and I feel a lot better for it.

So yeah, I was playing with my tag cloud thing and randomly clicked on one of the technorati links, one that took me to http://www.technorati.com/tag/meadowhall and ooh, all of them but 1 are mine. No wait, I don’t remember ever calling my blog after my real name “Mark Gilbert”, so what’s this. OMG, what are the chances of that, a name-sake also blogging about meadowhall. Wait, even more OMG, he lives in sheffield, and he blogs about similar things as I do. Have I got a split personality? Am I running 2 blogs and neither personalities know of each others? I’m scared. Funnily enough my other blog isn’t half bad, think I’ll subscribe and keep up with what my split personality is getting up to. He must quite like my name, i mean his name, mine his um, the name to have bought the domain. Myself, I hate it, but that’s probably a low self-esteem thing. I wonder if we’ve ever bumped into each other.

Del.icio.us Postal Service

With 1 Comment »

I haven’t been using del.icio.us an awful lot, I saw the potential but just never bothered. But now I’ve added a del.icio.us bookmarklet to safari and I’ve written a script to post my bookmarks to this here blog.

del.icio.us do actually offer their own tool for posting links to your blog but it’s rather obscure and doesn’t offer much in the way of customisation. Also it only lets you post them daily and I really do think that’s overkill, subscribers to your blog feed really don’t want your links thrown at them every single day. So i’ve made a quick php page to do it on demand, and i’ve added a cron job to cpanel which runs this once a month..

curl http://www.itchmerry.com/i’m/not/telling/you/where/it/is

Download delPost_php.txt here. You will need to change the extension before using it obviously.

When I started writing it I didn’t realise that php has an xml-rpc library. My php just constructs the xml as a big string and throws it at your blog server. But hey, it works? Just. Also, the del.icio.us api, such as it is, doesn’t offer a means of grabbing bookmarks between a date range. Either specified days, or a specified number of the most recent. My code currently grabs the 10 most recent. As I don’t use the service all that much I probably won’t add many more than 10 per month anyway. But to really be the months bookmarks the php code will need to pull each day of the month one after another, this would need some experimenting as it could take yonks to finish, and be a bit haphazard.

UPDATES: Version 0.0.5: Them silly amps + now displays html entities in the response.

Version 0.0.4: A few bug fixes + now includes “for the week of…” in the post’s subject.

Version 0.0.3 now collects del.icio.us links from a specified number of days. It takes longer because it’s calling back and forth from del.icio.us for each days worth. 7 Days seems ok though, so i think i’ll set it to fire weekly rather than monthly.

Turns out that php’s XML-RPC library is still at the experimental stage and isn’t included with the default php install. I’ll stick to constructing raw xml in code for now.

Is it safe yet?

With 1 Comment »

Is it safe yet? I’ve added a bit of holiday spirit to my site by adding a christmas tree, unfortunately there was nowhere to put it so Misty here is kindly holding it aloft for us.

My site has been all monged up lately. I’m not quite sure exactly, but i think what happened was that the web hosts introduced a new server recently and moved my site to it. The new server is also using a different nameserver so the domains dns entries needed to be changed. The DNS change must have taken a lot longer to propagate all the servers of the world than it should have, or maybe it was just blueyonder… my isp that messed up? I dunno, all this internet malake never made much sense to me, I’m sure there must be a better way to manage domains and all that, someone ought to shut the internet down and start again.

The problem was that the domain was resolving inconsistently somehow, sometimes it would send my browser to the new site and sometimes the old site. It was inconsistent between my 2 machines as well, sometimes my PC would be looking at the new site, and my mac would send me to the old site. and vise-versa, despite them both running from the same router. Weird huh? What caused mucho confusion was the fact that my web hosts didn’t remove my site from the old server, they just copied it and I would be posting entries and making small changes to my site on one comp, and they wouldn’t be showing up on the other and i’d be scratching my head thinking what the fuck is going on here?

Once i had figured out what had happened i emailed the hosts and asked them to remove the old copy of the site so that I could regain some sanity. They kinda agreed so now you either see my site or you see a ‘no website configured at this address’ type affair.

It’s still not sorted, and there probably isn’t much point posting anything until it is.

Tags part II

With No Comments »

Been playing some more with my tag code of wonder. It’s now more scalable and customisable. Plus it seems to work on IE now.

FluffyTags.js is the main scriptures (right click and save target). Here’s a quick example…

<ul id="taglist" class="listoflinks">
   <MTTags>
      <li title="<$MTTagCount$>">
         <a class="tagtext" href="<MTTagArchiveLink>"><MTTagName></a>
         <a href="http://www.technorati.com/tag/<MTTagName>"
         rel="TAG" title="TAG:<MTTagName>"><img width=16 height=16
         src="/images/techiconsmall.png" /></a> </li>
   </MTTags>
</ul>
<script type="text/javascript" src="FluffyTags.js"></script>
<script  type="text/javascript">
   var oParent = document.getElementById("taglist");
   tagCloud(oParent, //Element to start crawling from
      100, 255, 100, //colours (R,G,B 0-255) for low tag counts
      20, 200, 20,   //colours for high tag counts
      10, 40,        //text size range pt (low, high)
      2,             //count below this is insignificant
      200, 200, 200, //colours for insignificant tags
      10);           //text size for insignificant tags
</script>

Note class=”tagtext” in the MT stuff, my code looks for an element with this class to change the colour and text size of. The tagCloud function is what you call from the page and it takes a fair number of arguments which i have commented upon in the above example. I’m sure there’s lots of bugs.

Tags

With No Comments »

Stupid day. Been adding tags to my site, and now i’m not sure why i bothered.

First tag plugin I tried was tagwire which was great except it was a pain to install and it used live cgi searches to list the entries, rather than create a static archive, which would be less server intensive.

I then discovered that there was another tags plugin which seemed to be a bit more certified by six apart, so to speak as it’s listed on their power tools pages. It’s simply called tags. Now i’m not sure but i think this might be worse than the tagwire one so now i’m a bit miffed as its taken a bit of time to get all this going and i don’t fancy taking it all off and going back to tagwire. You see what tags seems to have done is taken my keywords and made categories out of them all. So now every time I post a new entry I’ve got a pulldown with 1001 bleedin categories I don’t want. Also, it doesn’t seem to have any mechanism to order the tags page by frequency/count, in fact they aren’t even alphabetical, just the order they were created. Fat use that is. Oh and, it creates a dir for each tag, just as categories do. So what I want to know is, what happens if i carelessing have a keyword that conflicts with another folder? For instance “images” ? Dumb.

A problem both plugins had was regarding how you deal with multi-word tags. There doesn’t seem to be a unified answer to this anywhere. Flickr sticks the words together such as “moveabletype” and technorati seems to seperate the tags out so that the spaces aren’t an issue. I’ve been simply seperating everything out in one long stream, I don’t even bother to delimit them with a comma. So really they had no chance of recognising them anyway.

Ah well, here’s my pretty tag page.

UPDATE:
I’ve added some script to snazz it up cloud style. It isn’t perfect and there’s some design issues for sure. But it’s getting there!

This is the MT html

<ul id="taglist" class="listoflinks">
   <MTTags sort_by="count" sort_order="descend" lastn="40">
      <li title="<$MTTagCount$>">
         <a style="color:#00FF00" href="<MTTagArchiveLink>"><MTTagName></a>
         <a href="http://www.technorati.com/tag/<MTTagName>" rel="TAG"
title="TAG:<MTTagName>"><img class="inline"  width=16 height=16
src="/images/techiconsmall.png" /></a> </li>
   </MTTags>
</ul>

And this is the script… (don’t laugh, I know its messy… my code always is)

<script>
   var objli;
   var obja;
   var lichildren;
   var obj = document.getElementById("taglist");
   var children = obj.childNodes;
   var nNum, szNum, nInvNum, nTextNum, szGreen;

   for(var i=0; i < children.length; i++) {
      objli = children[i];
      if(objli.tagName == "LI")
      {   lichildren = objli.childNodes;
         obja = lichildren[1];
         nNum = objli.title;
         if(nNum > 20) nNum = 20;
         nInvNum = 99 - (nNum * 6) - 5;
         szNum = nInvNum.toString();
         if(nNum == 1) {
            szGreen = "FF";
         } else {
            szGreen = "BB";
         }
         obja.style.color = "#" + szNum + szGreen + szNum;
         nTextNum = nNum * 3;
         if(nTextNum < 8) nTextNum = 10;
                        if(nTextNum > 30) nTextNum = 30;
         szNum = nTextNum.toString();
         obja.style.fontSize = szNum + "pt";
      }
   }

</script>

If yer mad and you want to use it, go ahead I guess.

UPDATE AGAIN:
I’m still playing.

www.flickr.com
This is a Flickr badge showing public photos from the Basset Griffon Vendéen group pool. Make your own badge here.



Creative Commons License

Hello you!

Email & IM: MRKisThatKid@gmail.com