December 12, 2006:
GPMINI moves to WordPress
Slowly …
I’ve done the move to WordPress once before but that was from individual pages (not a blog); this time I’m moving from MoveableType, a move which began very smoothly:
- Site5 provides Fantastico which installed WordPress into GPMINI in just a couple of seconds! Great ![]()
- I used the MoveableType export feature and then imported the 200+ posts and 400+ comments into WordPress
- I searched the WordPress themes to find one that was a bit like GPMINI (with a banner image and right hand sidebar), then started going through it to “tweak” the style closer to what I wanted
At this point things got rapidly messy & frustrating, primarily because of the loads of CSS styles in the theme I’d picked, and my laziness in never bothering to learn any more CSS, HTML or whatever than I absolutely have to … eventually I gave up and started again from the MINIsOnTop theme I’d created a few months back (which has loads less CSS so is much easier to modify!) … but first I had to move the “side bar” from the left to the right. Not too bad, so long as you really make sure you’ve done it everywhere!
Next I had a bit of a brainwave; instead of editing the theme CSS to match GPMINI, I replaced the CSS style with the current GPMINI one, then edited the theme layout files to use the new styles I already had - this way was much easier to get the layout looking like it should, and has the benefit of cutting down the number of different style features.
So far so good; I had the new WordPress weblog running and looking quite like the old - next I had to replace the old weblog and redirect all links to the new pages! For this, I had to search the mod for clues about redirection and Mod_Rewrite …
To make this work, I had to get the WordPress links into a similar format; unfortunately I now discovered that “-” is used to represent spaces, instead of “_”! There’s a plugin to fix this but it meant that I had to dump all the posts I’d imported, and start again … no “delete all” function so I sat and deleted every post one by one
But it worked, and now WordPress post links looked a lot like MoveableType ones:
MoveableType: http://www.gpmini.net/mtblog/archives/2006/07/cartoon_gp_shirts.shtml
WordPress: http://www.gpmini.net/wp/2006/07/cartoon_gp_shirts
I needed to set up a .htaccess file to manipulate the old incoming URL and redirect it to the new - easy when you read enough online examples ![]()
RewriteEngine on
RewriteRule archives/([a-z0-9/_]+)\.shtml /wp/$1 [R,NC,L]
RewriteRule ^(index.shtml)?$ /wp/index.php [R,NC,L]
RewriteRule ^rss2.xml$ /wp/feed [R,NC,L]
Amazingly it seems to work
With the basic weblog taken care of, I’m still not done. More searching and experimenting finally allowed me to get the GPMINI homepage using the same style & sidebar info as the weblog, however I still have to solve the Gallery main page which, with the experimentation to date, has no sidebar but just an error message.
The reasons behind this are that MoveableType is designed around creating files on the server, which can then be included in other files; WordPress doesn’t do this - instead all the URLs it has are directed to a program which generates output on the fly! To a browser, there’s no real difference but on the server there’s no file containing the sidebar so I can’t include it into the Gallery main page. More work needed …
So why did I do it?
I was prompted by discussion on our USA GP owners mailing list, to investigate a way for other GP owners to post on GPMINI (for example writing about their cars mods) - WordPress supports multiple authors more easily (and cheaply) than MoveableType. We’ll see whether I can get it to work usefully! Of course there was the intellectual challenge too … and finally, online opinion is that spam comment filtering is better on WordPress now (and since I get up to hundreds of spam comments each day, any improvement I can get is worth persuing).
murmini (2006/12/12 @ 4:52 pm)
Ian, I am watching with interest. My murmini blog is written in Ruby running on a Rails framework, but every now and then I think about migrating to wordpress. Good luck, and keep us informed of the progress.
Gabe (2006/12/12 @ 7:13 pm)
I’ve often thought about opening MF up to other logins and allow people to post (in draft form) directly to the site. It’s a great feature that Wordpress offers and can be very powerful if managed well.
BTW - I mentioned this idea to Todd last week when he told me about the GP mailing list. It’s makes a lot more sense in terms of information dissemenation. And once you have the weblog up and running you can rely on feedburner to serve an email list.
Now if WP just had a comment preview built in….
GP0203 (2006/12/12 @ 10:27 pm)
UPDATE:
Loads more web surfing tonight discovered this which identifies the same (”stripslashes_deep”) issue I was having, and suggests the use of “file_get_contents” to resolve it … tried it in the Gallery Footer and it seems to work
Josh Wardell (2006/12/13 @ 10:17 am)
Great work, Ian! The CSS and theme wrestling nightmares reminds me of what I went through when I adapted mine as well. And great work on the htaccess stuff.
My only complaint is the grey-on-grey text is a little hard to read.
Ian C. (2006/12/13 @ 2:03 pm)
Thanks Josh … same colors as before the move, but Margaret also commented on that last night. Maybe I should darken the text a little more (the colors are inspired by the GP Thunder Blue, Chili Red and Silver)
RB (2006/12/14 @ 11:23 pm)
How wide is the page? I have a 22″ display and it nearly takes the whole width. I gotta get to that GPMINI pic, this weekend, maybe.
GP0203 (2006/12/16 @ 3:23 pm)
Robert,
The design expands to whatever page size you give it - at 800×600 the sidebar drops to the bottom of the page, but any bigger than that it’ll work. I’m not such much concerned about layout and I don’t much like these designs that lock in a fixed width in the middle of the screen, no matter how big my monitor is …
db (2006/12/20 @ 1:19 am)
sidebar in wordpress = sidebar.php, which can be easily called from any of your theme pages you like.
If you need the ability to call it only from certain pages, you can create as many different page templates as you like and then access them directly from the post screen.
Nicely done! Let me know if I can help.