Migrating data from b2evolution to wordpress μ

August 15, 2008 at 4:29 pm | In programming, publishing, wordpress | 6 Comments

At work, we are just under way to migrate blogs from an b2evolution installation to wordpress μ. Shopping around for tools to do this didn’t reveal anything usable. Either the versions wouldn’t match or the functionality was too limited (generic import from RSS for example wouldn’t help with files, users and comments).

So i came up with my own script. I didn’t advertise it at wordpress.org, because obviously, just as most other migration tools, it’s tailored to our situation. In particular, it’s only tested with b2evolution 2.3 and wordpress 2.6; but since it relies mostly on the database schema, it should also be compatible with wordpress >= 2.3.

Features

  • migrates users, categories, posts, comments and files.
  • migrates one blog at a time.
  • works for wordpress and wordpress μ.
  • undo functionality, thus testing imports is easy.

Limitations

The script is written in python and supposed to be run on the machine where the wordpress installation is located (to be able to copy files into wp-content). It also assumes that the wordpress database is located on this machine.

The b2evolution installation does not have to be on the same machine, though, because the b2evolution data is scraped from an SQL dump of the database.

So in case somebody finds this useful – but not quite perfect – let me know, and i’ll see what i can do to help.

Update: More info about how to use the script and how to do the migration in general is available at https://dev.livingreviews.org/projects/wpmu/wiki/b2evolutionMigration.

6 Comments »

RSS feed for comments on this post. TrackBack URI

  1. hooray!

  2. Thanks for putting this together. I too need to migrate a b2e to wordpress mu but I know next to nothing about python. I setup the CONFIG.INI as per your instructions and the script was able to read the dump but then it stopped:

    Traceback (most recent call last):

    File “migrate.py”, line 615, in

    migrate(cfg, options)

    File “migrate.py”, line 343, in migrate

    res = retrieve_file(data['blogs'], data['users'], file_data, to_blog_id, cfg, options)

    File “migrate.py”, line 174, in retrieve_file

    status = url_status(url)

    File “migrate.py”, line 126, in url_status

    return c.getresponse().status

    File “/usr/lib/python2.5/httplib.py”, line 924, in getresponse

    response.begin()

    File “/usr/lib/python2.5/httplib.py”, line 385, in begin

    version, status, reason = self._read_status()

    File “/usr/lib/python2.5/httplib.py”, line 343, in _read_status

    line = self.fp.readline()

    File “/usr/lib/python2.5/socket.py”, line 331, in readline

    data = recv(1)

    socket.error: (104, ‘Connection reset by peer’)

    If you can help point me in the right direction, I will be forever grateful. Thanks again!

  3. Great work, but, um, I’m kind of a dunce with this stuff. How do I use this? Could you contact me and give me a quick run through? I’m using b2evo 2.4.2 and migrating the latest WordPress (2.6.2). Any help you can give I’d appreciate so much! Thanks.

  4. [...] migration of the vLib blog from b2evolution to WordPress… and the helpful developer wrote a script to do this [...]

  5. @ruben: the machine you run the script on needs HTTP access to the (still running) b2evolution instance to download files.


Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.