ENTRIES
Welcome to Eric Cheng's online journal! You are not logged in. [ Log in ]
«  :: index ::  »

Migration from b2 to WordPress 2.0.1-alpha

:: Wednesday, January 18th, 2006 @ 11:43:43 pm

:: Tags:

You know you’re in a bad situation when you’re forced to upgrade to an alpha product.

Having said that, WordPress seems to be behaving, probably because Alex King helpfully agreed to grab the latest trunk build, which I’m told contains many, many bug fixes. I tried to get access to the nightly build by signing up for the mailing list, but the link that was then sent to me went to a dead page. WordPress is a strange beast. It’s grown into a mature tool and is clearly proven in “the field” in that it seems to be relatively secure, and has lots of high-traffic sites using it. Having said that, I find that the support and organization behind the product is just shy of horrible. As a test, go to wordpress.org and try to find something. Give up? I nearly gave up several times while hunting for various things — and I’m pretty good at finding things.

So, why was I forced to upgrade? My server was hacked again. I have no idea how they got in this time, but I’m sick of all of these security holes on my box. Until now, I had been running b2 0.6.2, which shipped with a SQL Injection vulnerability that was fixed on 0.6.2.2. But I don’t remember if I applied the patch, and I couldn’t easily find the files I needed to make sure.

Moving forward, I’ve kicked everyone (else) off of my servers, and have removed all traces of old software, including the wonderfully-unsupported Exhibit Engine, which unfortunately hosted a couple thousand of the images I have online.

It was not straightforward to migrate from b2 to WordPress. Here’s the path I took:

b2 0.6.2 -> WordPress 1.0.2 -> WordPress 1.5.2 -> WordPress 2.0.1-alpha

WordPress 2.0, 1.5, and 1.0.2 are not available for download from any one place, so I had to hunt around for the original packages. At the moment, 1.0.2 is available from the old Sourceforge site, 1.5.2 is most easily obtainable from Alex King’s site (the WP 1.5.2 Plugged In version), and WordPress 2.0.1-alpha can be downloaded from the current WordPress site.

The migration process to the various versions went fairly smoothly, with the exception of custom field migration. b2′s custom fields were just tacked on as extra columns in the old b2posts table (boo!), and the migration scripts lose track of them at some point. The new custom fields are stored as key value pairs in the wp_postmeta table (or, b2postmeta, if you’re upgrading and use the original database table prefix name).

As an example, let’s say you have an old custom field called Location. Once you’ve upgraded all the way to WordPress 2.0, you can run the following SQL code to move the information over to the new table:

INSERT INTO b2postmeta (post_id, meta_key, meta_value) SELECT ID, ‘Location’, Location FROM b2posts WHERE Location <> ”;

Repeat for the rest of your custom fields; they should all move over with no problem. This assumes that you’re using b2 as your table prefix. The other thing I had to do was to manually set the option_value for siteurl in the b2options/wp_options table.

Previously, I had hacked in a privacy feature into b2 which allowed user-level access to private entries, and was left with all of my old posts public in the new system. But since I had migrated custom fields over, they were all tagged with private values that flagged the appropriate private posts. And so I downloaded the ViewLevel 2.0 plug-in for WordPress 1.5, which is a good start to a user-level privacy system in WordPress 2.0. I renamed all of the Private custom field key names to viewlevel, modified the ViewLevel code for compatibility with 0-level access, and it all seems to work. Private messages no longer appear at all to people without access, so those users out there who browse my site anonymously until they see a private placeholder will have to be better about staying logged in.

Alex encouraged me to use the new user roles in WP2.0 instead of continuing to use user levels, but it seems to be working at the moment. I’ll make the changes when I have some more free time…

Oh, yeah. The templates took several hours to re-built into a theme. I made it very-much un-theme-like, but I’m glad it’s done.

Differences you’ll notice:

  1. no private post placeholders
  2. no “last logged in” information, nor new post/comment icons (yet)
  3. no date dividers
  4. rss for comments (yay!)
  5. comments/trackbacks use akismet (not sure how it works yet)
  6. emoticons are visible. not sure yet how to turn these off. i hate them.

Let me know if you notice anything weird. ;)

I still hate computers.

UPDATE 1/22/06 Many of my older entries don’t render properly because WordPress doesn’t like javascript in entries. I’m fixing them slowly, but it’s a slow process because each one has to be done manually…

UPDATE 1/23/06 I updated about 150 entries; images should look fine now. (took a couple of hours)

UPDATE 2/3/06 WordPress 2.0.1 has been released; the distributed development team has fixed 114 bugs since the 2.0 release a month ago.

| New York, NY | link | trackback | Jan 18, 2006 23:43:43
  • http://ihatepink.com Caroline :)

    emoticons? where? :) :( :P :D

    your little addendum at the bottom of your right-hand column cracked me up :)

  • http://echeng.com echeng

    Hey, Caroline! I got rid of them emoticons. ;)

  • Pingback: alexking.org: Blog > Around the web

  • http://photomatt.net/ Matt

    Just two notes:

    You can download every old release of WordPress here – http://static.wordpress.org/archive/ .

    We don’t attempt to upgrade custom fields because they were never a part of b2, they were an extension or hack of some sort that were never core.

  • http://echeng.com echeng

    Thanks for the notes, Matt. Hopefully, old b2 users can use the SQL in this post to upgrade their custom fields.

    As for the WordPress archive — I believe that the link you supplied is a good example of why things are hard to find if you already don’t know where to look. I ran many google searches and never came across the static archive! Thank you for the link.

    And a good point as well is that the nightly builds are available here: http://static.wordpress.org/builds/

  • Pingback: [ECHENG.COM] Eric Cheng - The Web Journal

  • http://www.martysteinberg.com martys

    So, the first time I log in with the new WordPress authenticator I need to fill in all my profile info again. OK, not a problem – but why isn’t there a field to enter my MSN/WIndows Live Messenger IM name? There’s AIM (blech!), Yahoo (ok, they’re our new friends in the Messaging world) and gTalk?? Come on man, you’re killing me :-(

  • http://echeng.com echeng

    Marty – talk to the WordPress folk. Those are the default fields! Microsoft must have pissed them off or something. ;)

  • Pingback: dressy white maternity tops

  • Pingback: Repo XR ™ - Repossession Software

  • Pingback: towing software

  • Pingback: clothing

  • Pingback: black diamond engagement rings bands

  • Pingback: Independent.Academia.edu

  • Pingback: yellow pages minnesota

  • Pingback: Armenia business pages

  • Pingback: Reef Safe Fish Medication

  • Pingback: mask for sleep apnea

ARCHIVES
Journal Home
Where is Eric? (password)
Stuff for Sale
February 2014 (2)
December 2013 (1)
October 2013 (1)
June 2013 (3)
May 2013 (2)
April 2013 (3)
March 2013 (1)
February 2013 (2)
January 2013 (3)
November 2012 (2)
October 2012 (3)
September 2012 (8)
August 2012 (8)
July 2012 (8)
June 2012 (8)
May 2012 (5)
April 2012 (8)
March 2012 (15)
February 2012 (7)
January 2012 (6)
December 2011 (8)
November 2011 (10)
October 2011 (12)
September 2011 (8)
August 2011 (14)
July 2011 (9)
June 2011 (9)
May 2011 (11)
April 2011 (11)
March 2011 (12)
February 2011 (23)
January 2011 (22)
December 2010 (16)
November 2010 (17)
October 2010 (26)
September 2010 (24)
August 2010 (24)
July 2010 (30)
June 2010 (26)
May 2010 (21)
April 2010 (26)
March 2010 (19)
February 2010 (17)
January 2010 (29)
December 2009 (21)
November 2009 (23)
October 2009 (32)
September 2009 (19)
August 2009 (34)
July 2009 (21)
June 2009 (30)
May 2009 (23)
April 2009 (18)
March 2009 (6)
February 2009 (25)
January 2009 (5)
December 2008 (6)
November 2008 (22)
October 2008 (27)
September 2008 (25)
August 2008 (34)
July 2008 (34)
June 2008 (32)
May 2008 (26)
April 2008 (15)
March 2008 (19)
February 2008 (31)
January 2008 (43)
December 2007 (33)
November 2007 (29)
October 2007 (29)
September 2007 (9)
August 2007 (19)
July 2007 (10)
June 2007 (17)
May 2007 (26)
April 2007 (38)
March 2007 (39)
February 2007 (13)
January 2007 (35)
December 2006 (35)
November 2006 (14)
October 2006 (6)
September 2006 (20)
August 2006 (24)
July 2006 (32)
June 2006 (17)
May 2006 (23)
April 2006 (16)
March 2006 (16)
February 2006 (26)
January 2006 (33)
December 2005 (17)
November 2005 (21)
October 2005 (18)
September 2005 (17)
August 2005 (5)
July 2005 (15)
June 2005 (20)
May 2005 (25)
April 2005 (7)
March 2005 (22)
February 2005 (20)
January 2005 (38)
December 2004 (6)
November 2004 (24)
October 2004 (16)
September 2004 (22)
August 2004 (12)
July 2004 (17)
June 2004 (15)
May 2004 (11)
April 2004 (35)
March 2004 (40)
February 2004 (29)
January 2004 (36)
December 2003 (20)
November 2003 (18)
October 2003 (10)
September 2003 (18)
August 2003 (10)
July 2003 (34)
June 2003 (12)
May 2003 (49)
April 2003 (42)
March 2003 (42)
February 2003 (15)
January 2003 (7)
December 2002 (17)
November 2002 (19)
October 2002 (24)
September 2002 (22)
August 2002 (20)
July 2002 (21)
June 2002 (14)
May 2002 (15)
April 2002 (11)
March 2002 (13)
February 2002 (20)
January 2002 (17)
December 2001 (16)
Even Older Journal
Travel Journals

CATEGORIES / TAGS
(25) (2) (1) (3) (1) (1) (1) (6) (2) (3) (11) (8) (3) (1) (1) (4) (2) (4) (2) (1) (6) (1) (1) (1) (6) (2) (1) (1) (1) (3) (1) (5) (1) (1) (23) (1) (1) (1) (1) (1) (14) (1) (10) (1) (1) (2) (1) (1) (1) (27) (6) (3) (2) (4) (4) (1) (1) (41) (11) (12) (4) (38) (1) (3) (2) (4) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1) (10) (25) (8) (3) (2) (3) (2) (1) (5) (1) (1) (2) (1) (1) (14) (1) (5) (1) (1) (5) (43) (1) (1) (1) (3) (24) (1) (1) (1) (1) (5) (1) (4) (1) (1) (10) (1) (3) (1) (1) (1) (1) (6) (5) (1) (1) (1) (3) (1) (3) (1) (1) (1) (69) (4) (3) (7) (3) (1) (16) (6) (1) (29) (1) (7) (1) (4) (4) (4) (1) (1) (1) (1) (1) (1) (1) (10) (4) (4) (2) (1) (89) (14) (1) (2) (79) (2) (2) (1) (1) (1) (1) (1) (1) (3) (2) (3) (1) (1) (24) (3) (5) (4) (1) (2) (1)
MOST POPULAR
Most Popular Posts of All Time


Eric Cheng's RSS Journal Journal RSS
Eric Cheng's RSS Journal Comments RSS

proudly powered by wordpress
script exec time: 0.50s
i hate computers.