Technosailor.com Readers! Donate today to assist the Lambi Fund Haiti Peasant Relief in their efforts.

5 July 2006 3,408 Comments

WordPress-to-WordPress Import

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.

  1. Upload
    1
    wp-xmlmigrate.php

    to

    1
    wp-content/plugins/
  2. Upload
    1
    wordpress.php

    to

    1
    wp-admin/import/
  3. 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

Pick up your copy of the WordPress Bible, a wildly popular resource for beginners and experts alike.

Popularity: 52% [?]

3,408 Responses to “WordPress-to-WordPress Import”

  1. Daniel Black 7 April 2008 at 9:34 pm #

    Thank you very much for this plugin. Works quite nicely with WP 2.5 (importing from 2.0.2).

  2. jocuri 27 May 2008 at 3:00 pm #

    Thanks for this useful plugin.

  3. radyo 31 May 2008 at 5:31 pm #

    thx for this tips here i test it on my test wp site

  4. felix 2 June 2008 at 3:50 pm #

    If you get “The uploaded file could not be moved to…” error, the solution is to set the permissions on the ‘wp-content’ folder to ‘777′ using an FTP client.

  5. associate 9 June 2008 at 2:57 am #

    Does this plugin allow to import only a few posts or do you have to import/ export all your posts?

  6. UP 10 June 2008 at 7:19 am #

    To use for 2.0+ versions you need to disable these 2 lines at the start of the code:

    // if ( ( ‘2.0′ == substr( get_bloginfo(‘version’), 0, 3 ) ) || ( ‘1.5′ == substr( get_bloginfo(‘version’), 0, 3 ) ) )
    // {

    And this line at the second last line of the code:

    // }

    just before the PHP end tag

  7. UP 10 June 2008 at 7:22 am #

    Correction to that last post – I tried it and it doesn’t work. Apparently it’s not supported for 2.3.3 versions etc. I was trying to use this plugin to migrate from 2.3.3 to 2.2.3

  8. Angel 15 June 2008 at 10:29 am #

    Using your plugin, can I select the articles which I want to export import ?

  9. Joanne 2 July 2008 at 7:22 pm #

    Is this plugin compatible with wordpress 2.5? I uploaded the plugin, activated, copied the wordpress.php file to wp-admin/import – but I can’t see how to export. I’m trying how to figure out how to export all posts from a single category. Thanks.

  10. Aaron Brazell 2 July 2008 at 7:24 pm #

    Of course not, Joanne. The post says it’s for WordPress 2.0 and lower and that WordPress 2.1 and higher (this includes WordPress 2.5) has it built in.

  11. Your Computer Genius 3 July 2008 at 8:31 am #

    I didn’t know that 1.5.2 blogs still existed any more. But, lo and behold, a client came to me with one!

    I used the method in #333 (actually tried it before I read that) but also I had to reformulate the xml stream. I just changed it to ‘text’ instead of ‘text/xml’ because (and maybe it’s just safari — others could be more forgiving) my browser didn’t appreciate the format!

    But then it worked.

    Thanks! Cheers!

  12. Greg 22 July 2008 at 4:13 pm #

    Thank you! Your export plugin saved me from a world of hurt.

    I had an old Japanese blog using Wordpress ME 1.5.1.3. I was lazy and never updated it. Finally a problem bubbled up because of some new database version at my host. I had to do a couple of tweaks suggested by commenters above to get it working.

    First I added the 1=1 trick to the if statement. This allowed the export option to appear because it wasn’t there at first.

    Second I had to delete category_count as Anne suggests above.

    After that, the export went fine, and I was able to import everything perfectly into the latest Wordpress 2.6 (Japanese version). PHEW! THANKS AGAIN!


Trackbacks/Pingbacks.

  1. Bruno’s blog » Blog Archive » My blog is moving to WordPress.com - 11. Jan, 2007

    [...] already exported all my post using WordPress-to-WordPress Export [...]

  2. SharpCraft » Blog Archive » Wordpress.com posts moved over - 11. Jan, 2007

    [...] I have now imported my four wordpress.com blogs to this one. It was a little trickier than I first thought. Wordpress.com is actually a different system than the wordpress blog I’m using now, because it is a multi-user environment. I had to use the wordpress-to-wordpress plugin from http://www.technosailor.com/wordpress-to-wordpress-import. [...]

  3. Unikram, Paper, Recherchen & Software » Erreichbarkeit mancher Artikel - 12. Jan, 2007

    [...] die Artikel doch zugänglich sind, habe ich dieses Blog mit dem PlugIn WordPress to WordPress-Import exportiert und in ein WordPress.com-Blog gespiegelt. Dort sind alle die Beiträge – in [...]

  4. Verhuizing at www.GuySie.nl - 15. Jan, 2007

    [...] ga proberen om via een import plugin de oude posts en comments uit deze site als history wel mee te nemen naar de nieuwe site, maar ik [...]

  5. History line at Style.overSubstance - 15. Jan, 2007

    [...] previous site GuySie.nl and in Dutch. They have been imported automatically through the use of the Wordpress-to-Wordpress import plugin. They are unmaintained and may not be in a correct category. I’m trying to get that [...]

  6. MeIrz » Возвращение блудного сына. - 15. Jan, 2007

    [...] Я себе приобрел другой сервер. Теперь мой сайт бегает на Mac os X. Собственно в этом возникла проблема, хотя тут сложно сказать. На Линксе я свой сайт гонял и было всё нормально. Ну да ладно. Проблема закралась при переносе mySQL дампа. Переносил и пытался его переварить как только мог. В этом мне по большей части помогал Mr. Ghost за что ему большое спасибо. Но после тяжёлой битвы перенести базу так и не получалось. При переносе базы на Мак ос Х получалось какая то не понятная вещь. Проблема в том что некоторые символы джамились, но при этом не было не какой рациональности. Какие именно буквы страдали и почему. Я было уже отчаялся, но что-то говорило что выход есть. И вот сегодня в 4 утра по Торонтовскому времени нашёл способ. Способ до банальности просто и эффективен. Идея такова: Используется сам Wordpress что бы перенести все статьи данные в XML фаил на ваш компьютер, а после так же запихнуть тот же XML в новый блог. И как не странно всё заработало как надо! Сслыка на то как это осуществить тут [...]

  7. Internet Marketing 4 Noobs » Woo…Wordpress admin area up and running nicely. - 15. Jan, 2007

    [...] Wordpress to Wordpress Import Plugin, the name says it all. Saved me quite a lot of work in transfering the contents back at Wordpress.com to my new hosted Wordpress blog. [...]

  8. ranchochase.com » Blog Archive » Rancho Chase begins the move - 18. Jan, 2007

    [...] took a simpler path that literally took less than two minutes. I used Aaron Brazell’s awesome WordPress to WordPress Import Plugin to export the existing blog content into a WXR file that I then imported into the existing [...]

  9. WordPress, MySQL Türkçe Karakter Problemi | Hus Weblog - 19. Jan, 2007

    [...] düşündüm. Yazılar ve yorumları ise problemsiz bir ÅŸekilde yine AcemiBlogcu’ nun önerdiÄŸi Wordpress XML Export plugin’ i ile kurtaracaktım ki nihayet çözümü az önce buldum [...]

  10. Stuff by Sarah » What I’ve been up to - 20. Jan, 2007

    [...] so I’ve imported all of my personal posts using Aaron Brazell’s WordPress Importer which is a hacked plugin from a feature due in WordPress 2.1 (clearly I wasn’t the only one [...]

  11. Got hosting : The Far Corner - 21. Jan, 2007

    [...] much here yet! And I managed to import all of the WordPress hosted entries and comments thanks to this fine [...]

  12. 10 Things You should Know About WordPress 2.1 » Technology, Blogging and New Media - 21. Jan, 2007

    [...] WordPress Migration Functionality – I unequivocally can say that when I released the Wordpress-to-Wordpress migrator, I had no idea that it would bring me as much traffic or that the tool would recieve such warm [...]

  13. WordPress 2.1 - eindelijk at Enthousiasmeren - 23. Jan, 2007

    [...] WordPress Migration Functionality – Aaron had een plugin gemaakt samen met Matt om de overgang van en naar verschillende blogs mogelijk te maken. Deze import [...]

  14. notes - » Nanowo - 23. Jan, 2007

    [...] ile importowanych wpisów :/. Tak więc jeśli ktoś zamierza się przeprowadzać polecam plugin WordPress XML Export żeby zaoszczędzić sobie kłopotów. A tak na marginesie, jest nowy WordPress [...]

  15. Learning Reiot » Blog Archive » Wordpress 2.1 업그레이드? - 23. Jan, 2007

    [...] 으로 이사가려고 wordpress-to-wordpress import 플러그인을 깔고 xml 파일을 받아서 reiot.wordpress.com 으로 이사를 갔으나, [...]

  16. HAKKICEYLAN » Blog Archive » Tekrar Merhaba dünya! - 27. Jan, 2007

    [...] de problemler çıktı, neyseki yedeğimiz vardı. Biraz karakter sonurum olmadı değil ama onu da WordPress-to-WordPress Import eklentisi ile hallettim sayılır. Şimdi bir iki ufak şey kaldı onlarıda düzelttim mi herşey [...]

  17. Got hosting! at The Far Corner - 29. Jan, 2007

    [...] much here yet! And I managed to import all of the WordPress hosted entries and comments thanks to this fine [...]

  18. » Blog Archive » Upgrading WP 1.5.1.3 to WP 2.1 - 03. Feb, 2007

    [...] Go grab the Wordpress XML Export . Follow the instructions to put wp-xmlmigrate.php into your wp-content/plugins/ [...]

  19. Emmense » Moving One Category to a New WordPress Blog - 04. Feb, 2007

    [...] of WordPress and WordPress.com blogs. For WordPress blogs prior to WordPress 2.1, I created the WordPress export plugin and it was accepted with wide praise and [...]

  20. A Word of Caution When Changing Domains | All Things Seen and Unseen - 06. Feb, 2007

    [...] my recent move I transferred the contents of this blog by using the WordPress XML Import/Export plugin developed by Aaron Brazell (from code by Matt Mullenweg that is being developed for WP [...]

  21. Thoughtcatcher » Blog-Archiv » Der Thoughtcatcher zieht um - 11. Feb, 2007

    [...] dieser Woche aber stieß ich dann über diesen Beitrag im Wordpress-Forum auf das WordPress-to-WordPress Import-Plugin von technosailor, das ich gestern getestet habe. Vom Ergebnis war ich restlos begeistert: das [...]

  22. TechCrunch is Down. Michael is miffed » Solo Technology - 12. Feb, 2007

    [...] and plugins and themes is trivial. Getting some content to that test site is easy too (See the import plugin for use pre-2.1 as an [...]

  23. The Lonely Marketer - a discussion for the small business marketing manager » 9 Steps To Moving Your Blog and Selecting Plugins - 13. Feb, 2007

    [...] there wasn’t anything built in to move from Wordpress.com to Wordpress.org. Then, I found Technosailor’s plug-in that moves posts, comments, etc. from Wordpress to Wordpress. Incredibly easy plug-in that worked [...]

  24. Ronald Lewis Dot Com » Blogger: Move Your Blog To WordPress in 10 Easy Steps! - 17. Feb, 2007

    [...] Download the WordPress-to-WordPress import/export plugin. Follow the directions outlined to install the plugin on your server for [...]

  25. Make Easy Money » Blog Archive » Blogger: Move Your Blog To WordPress in 10 Easy Steps! - 17. Feb, 2007

    [...] Download the WordPress-to-WordPress import/export plugin. Follow the directions outlined to install the plugin on your server for [...]

  26. Bad Boy Blogger » Blog Archive » Part time blogging… - 21. Feb, 2007

    [...] WordPress-to-WordPress Import – Great little plugin that allows you to export ALL your posts and comments as an xml file down to [...]

  27. subREVOLT: We like weird things. » Blog Archive » A word about possible weirdness today! - 21. Mar, 2007

    [...] Many props to Kevin, the owner and proprietor of Pointlessbanter.net for the help in getting the import/export dealie set up! And of course props to the gentlemen who wrote this handy Wordpress-to-Wordpress migration tool. [...]

  28. stevienova.com » Backing up your Wordpress Blog Database From Wordpress - 22. Mar, 2007

    [...] is a blog post on the plugin you need, and [...]

  29. myBabyBay.com » Blog Archive » Backup Your Blog - 24. Mar, 2007

    [...] I found an excellent plugin (wp-xmlmigrate plugin) to export it to XML file from http://technosailor.com/wordpress-to-wordpress-import/ . For those running on WP 2.x and above, there should be an export function. You can export your [...]

  30. Urban Spelunking » Blog Archive » Moving Wordpress Blog from ITP server to a Hosted Server - 30. Mar, 2007

    [...] a bit of research, however, i found this plugin by Aaron Brazell which allows the export with no problem, meanining all of the posts are now [...]

  31. How To Transfer A Domain - David Cowgill's Blog - 09. Apr, 2007

    [...] file. I had to do this with my WordPress blog data which was actually pretty easy. There’s a plugin to do this otherwise you can just run the built-in export function under “Manage” [...]

  32. a crank’s progress : migration notes: Moving Wordpress to Wordpress - 22. Apr, 2007

    [...] are ways of exporting from WP, as well, but none of them official, as yet. Still, it works, if you call ending up with a 14 meg [...]

  33. Flippant News » Off Topic:: How to move Wordpress blog, from one site to another - 13. May, 2007

    [...] new host and tweak the code to the new host specifications, this seem a good option until, I found Aaron Brazel’s blog and where he created a plug in that helps you export your blog as an eXtended RSS file and then you [...]

  34. Der wilde Garten | links for 2007-06-03 - 02. Jun, 2007

    [...] WordPress-to-WordPress Import Sagt ja wohl alles (tags: WordPress Plugins Blogging) [...]

  35. Wordpress to Wordpress Migration « The Digital Dilemma - 09. Jun, 2007

    [...] 1: I downloaded the wp-xmlmigrate [...]

  36. Abiyasa Blogs » Blog Archive » My Indonesian Blog - 30. Jun, 2007

    [...] my old Indonesian posts from here to Bolu Kukus Abiyasa, using a life-saver plugins for wordpress, Wordpress-to-Wordpress Import  Later, I will delete all Indonesian post from Abiyasa [...]

  37. No old Blog. No New Blog. There’s only one blog. | GreySquare Blog - 28. Oct, 2007

    [...] http://www.technosailor.com/wordpress-to-wordpress-import/ [...]