I know there are quite a lot of folks who have wanted to merge WordPress blogs or in one way or another import from one blog into another. The feature is coming in the next major build of WordPress and is already in place on WordPress.com blog. Trust me. But for now, I have wrapped that code into a plugin. I’ve already merged two blogs and there are other reasons I need this as well. It works. I have not had a lot of other extensive testing, but for me it works.
So while Matt Mullenweg wrote most of this code, I’ve ripped it off and made it into a plugin for those of us not running bleeding-edge next-gen WordPress blogs.
The exporter pumps a WordPress blog (including comments) out to a WXR file (WordPress eXtended RSS). It will allow you to import blog entries and comments into an existing WordPress blog. It does not overwrite existing entries and it respects authors by giving you the ability to choose who the imported entries are attributed to.
To use it, download the zip (7.6k) or tarball (6.8k) and extract.
- Upload
wp-xmlmigrate.phptowp-content/plugins/ - Upload
wordpress.phptowp-admin/import/ - Activate the plugin.
Note: Both of these files are optional. Uploading wp-xmlmigrate.php and activating will only provide the ability to Export a WordPress blog via the Manage > WP Export menu. Uploading wordpress.php will allow you to import an existing WXR file (a dump from another blog). This file is actually an importer, not a plugin, and so activation is not required to use it. Access the Import mechanism through the standard WordPress Import menu.
Really, the credit goes to Matt Mullenweg for 90% of the code.
Changelog
1.0
- Initial Release
1.0.1
- Minor PHP fixes
1.0.2
- Fixes Version check error when migrating from a WP 1.5.x blog
2.0 - Nov 15, 2006
- Rewrite of codebase
- Fixes “dirty” XML export
- Add support for Category Exports
- Adds support in Export for “Excerpts”. Does not fix weakness in wordpress Importer that does not import excerpts.
2.0.1 - Dec 5, 2006
- No Fixes to export
- Now bundled with new Automattic-developed wordpress.php import file


Add New Comment
Viewing 276 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Great work!
Do you already have an account? Log in and claim this comment.
Textile and MArkdown are both plugins. Therefore they are filters of the_post(). If you look in the database at the raw entry, it will have all the textile/markdown markup. It's not formatted there. When the_content() is called and filtered on Markdown or Textile, the formatting comes through.
That being the case, if you import a WordPress blog that has been using Textile/Markdown, you'll be pulling in the raw content that is unformatted. To preserve the formatting, the new blog will have to have Textile or Markdown enabled as well.
Do you already have an account? Log in and claim this comment.
And I couldn't help but notice The Wire: Season 1 peeking at me from below. Great, great show. First class all around in my opinion. McNulty man.
Do you already have an account? Log in and claim this comment.
Even for just a few posts to test, this plugin in invaluble!
Do you already have an account? Log in and claim this comment.
I've just tried to import my old wordpress blog into wordpress.com . Sadly it says
Sorry, there has been an error.
The uploaded file exceeds the upload_max_filesize directive in php.ini.
The file is about 2.1mb. Is there any way I can chop the file?
regards,
Steven
Do you already have an account? Log in and claim this comment.
Worked without a hitch and all is great with the world again.
Do you already have an account? Log in and claim this comment.
The plugin is giving me an error when I activate it in my wp1.5.1.3 version blog:
Warning: Wrong parameter count for substr() in /home/grace/public_html/wp/wp-content/plugins/wp-xmlmigrate.php on line 12Consequently, I am not given an option to export.
I am on the verge of closing my old blog (leaving a host) and your plugin promises to preserve just files I care to keep.
I would appreciate any help you could offer. I am using your plugin version 1.0.
Thank you for the right plugin at the right time!
Update: I decided to try to remove line 12 along with it's corresponding brackets . . . and It Worked! :)
I thought this would still be worth posting.
Now, I suppose I also wouldn't mind being able to easily export my links. Just in case. :mrgreen: (How come wp doesn't allow for subcategories for links, anyway?)
Do you already have an account? Log in and claim this comment.
As for the rest of the import, unfortunately this is not a full fledge importer. This is a plugin that duplicates behavior in the next version of WP. I suppose I might be able to figure out how to do the links and cats, etc, but everything would get a little complex for an XML file. We'll see.
Do you already have an account? Log in and claim this comment.
Great Plugin! But the import dont work at my blog. I import the xml file an after a while I get the message to download my admin.php! Whats wrong? Hope you can help me!
killercup
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
please help me! i have to migrate a blog with more than 500 osts an sql-import crashes because i got an error when i want to write a new post.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
is it clever just upgrade to the newest beta?
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
if this is an server-problem, please tell me, else it might help to split large files on export!
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
i hope you can tell this some other developers and there will be an option to split the export e.g. in month.
Do you already have an account? Log in and claim this comment.
if ( ( '2.0' == substr( get_bloginfo('version'), 0, 3 ) ) || ( '1.5' == substr( get_bloginfo('version'), 0, 3 ) ) )