Migrating data from b2evolution to wordpress μ

August 15, 2008 at 4:29 pm | Posted in programming, publishing, wordpress | 8 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.


  • 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.


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.



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


    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.

  6. Hi,
    just to let you know I wrote a new MovableType format exporter for b2evolution that is really complete ( http://frenchw.net/2012/02/01/exporting-b2evolution-movable-type/ ) and that I used it to perfectly migrate my b2evolution to WordPress. Here is a quick tutorial, written in french (for the moment) but quite easily readable ( http://frenchw.net/2012/01/31/migrer-de-b2evolution-vers-wordpress/ ).
    The exporter is released as open source on github : https://github.com/FrenchW/MtExport
    Sorry for such link list, but, I really had low results in my initial search for help.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: