WordPress-to-WordPress Import

by Aaron Brazell on July 5, 2006 · 3,408 comments

About Aaron Brazell

Aaron Brazell is the Lead Editor of Technosailor.com, a frequent public speaker, photographer, entrepreneur, and the author of the upcoming WordPress Bible from Wiley Publishing.

Email Aaron at aaron@technosailor.com

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 wp-xmlmigrate.php to wp-content/plugins/
  2. Upload wordpress.php to 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

Popularity: 80% [?]

{ 137 trackbacks }

Import/eksport af en Wordpress blog » ProBlog.dk » At blogge - din guide til blogging og blog-værktøjer
July 6, 2006 at 6:49 am
wordpress™ wank » nice work
July 6, 2006 at 6:18 pm
b5media.com - the blogger's blogging network
July 6, 2006 at 6:42 pm
  WordPress Hacks: WordPress-to-WordPress Import by Blogging Pro
July 11, 2006 at 6:38 pm
DigiZen » Blog Archive » Importando de WordPress a WordPress
July 11, 2006 at 9:35 pm
blogpocket 6.0 » Exportar e Importar de WordPress a WordPress la locura de los weblogs dentro de uno
July 12, 2006 at 7:29 am
WordPress Italy » Blog Archive » Plugin WordPress: WordPress-to-WordPress Import
July 12, 2006 at 8:26 am
Rumore » Blog Archive » links for 2006-07-13
July 12, 2006 at 8:35 pm
JetProject
July 14, 2006 at 8:55 am
FunkWadCuintWhich » Blog Archive » Butter Up Your Blog
July 17, 2006 at 2:33 am
skeddy.net » Blog Archive » The Look
July 18, 2006 at 1:20 pm
» Moving domain names with wordpress » Blog Archive » guinchoguy.com
July 20, 2006 at 9:46 am
miamoto.de » Blog Archive » Wordpress Update
July 30, 2006 at 1:53 pm
BloggingPro China » Blog Archive » WordPress Plugin: WordPress-to-WordPress Import
August 1, 2006 at 12:08 am
Linkblog for Tuesday, 01 August, 2006 » Chandrasekhar Vallabhaneni
August 1, 2006 at 12:52 pm
WordPress-to-WordPress Import Plugin at Note To Self
August 2, 2006 at 4:53 am
Samuel Tilly » WordPress Hack - WordPress-to-WordPress Import
August 2, 2006 at 7:26 pm
Thoughtcatcher » Blog Archive » Der Thoughtcatcher zieht um
August 5, 2006 at 2:48 am
闲来无空 » links for 2006-08-08
August 8, 2006 at 11:22 am
Thoughtcatcher » Blog Archive » Neue Wordpress-Plugins im Blog
August 8, 2006 at 3:57 pm
raena.net » Blog Archive » Flashback!
August 11, 2006 at 1:00 pm
Chris » 搬家工具
August 13, 2006 at 3:02 am
Pituruh Blog » Blog Archive » Howto IMPORT & EXPORT wordpress to wordpress
August 13, 2006 at 4:20 am
Nerd’s Nook dot net » Blog Archive » Easy Peasy
August 13, 2006 at 3:33 pm
links for 2006-08-15 at Hawkeye :: Murali’s Blog
August 15, 2006 at 2:26 pm
surfeurope - Actualización de la página
August 17, 2006 at 4:07 pm
iface thoughts » Blog Archive » The New Avatar (or Moving From Wordpress.com)
August 21, 2006 at 1:07 pm
Rumore » HOWTO: make a local copy of your Wordpress blog in Ubuntu
August 24, 2006 at 11:52 am
Can I move my blog from here to another blog somewhere else? « Frequently Asked Questions
August 29, 2006 at 1:52 pm
idly » 不只是歸檔狂,也是備份狂?
September 2, 2006 at 11:35 am
sw0rdfish 3.0 » Blog Archive » Wordpress / Hosting Transition
September 2, 2006 at 2:24 pm
MondoBlog » Blog » Wordpress World Num 4 - Importare gli articoli da un blog Wordpress all’altro
September 3, 2006 at 9:31 am
wordpress.com en español « LunaTICs
September 5, 2006 at 4:30 am
passion makes all the difference… « space to imajin
September 7, 2006 at 10:54 pm
import/ export function in wp « ygao’s net home
September 11, 2006 at 2:45 am
Fischler.org » Blog Archive » Like a freshly cleaned room
September 16, 2006 at 3:10 am
johnqalchemy » Blog Archive » Merge Wordpress installations
September 17, 2006 at 6:14 pm
The cycle we called life » My wordpress to wordpress blog migration experience
September 17, 2006 at 7:43 pm
love and rage » reconnected
September 18, 2006 at 6:48 pm
loveandrage.org.uk » Blog Archive » reconnected
September 18, 2006 at 7:22 pm
love and rage » Blog Archive » reconnected
September 19, 2006 at 2:26 pm
Cregy Bits and Bobs » Blog Archive » WordPress-to-WordPress Import
September 22, 2006 at 4:22 pm
Penguin Girl» Blog Archive » breakage now
September 26, 2006 at 7:16 pm
Shades of Black » Blog Archive » Newsflash! :-)
September 27, 2006 at 2:34 pm
Importare gli articoli da un blog Wordpress all’altro « Mondo Wordpress
September 29, 2006 at 7:23 am
Andy C :: from WordPress.com to WordPress.org
September 30, 2006 at 7:12 am
j2eegeek.com is not available « Vinny Carpenter’s blog
October 3, 2006 at 12:49 am
Because Two Blogs Are Better As One | Timothy’s Burden
October 7, 2006 at 5:32 am
Gremo na svoje, nadaljevanje: izvoz in uvoz vsebin « hirkani
October 10, 2006 at 1:18 am
Grem na svoje, težave z uvozom vsebin « hirkani
October 10, 2006 at 4:07 am
Christopher Barnette » The Move is Complete
October 10, 2006 at 4:22 pm
Importare da WordPress - WordPress Mania.Trucchi, notizie, plugin, temi
October 13, 2006 at 11:16 am
Wordpress finally supports WXR imports! « kerneljack’s diary
October 13, 2006 at 7:31 pm
AOWS » Importar de Wordpress a Wordpress
October 17, 2006 at 11:35 am
Sandboxing WordPress: Kicking around with Plugins, Themes And Hacks: tunequest: no repeats
October 18, 2006 at 9:12 pm
Mama’s Bloggin » Blog Archive » The WordPress-to-WordPress migration is complete
October 21, 2006 at 5:15 pm
30 seconds to Tambu » Blog Archive » da splinder a wordpress. lo stato dell’arte
October 26, 2006 at 9:06 am
L’esprit d’escalier - » De la continuité…
November 2, 2006 at 3:32 pm
Slow and Sloppy in an Unsecured World « David W. Boles’ Urban Semiotic
November 3, 2006 at 11:08 am
Solo Musings » Oops, what happened to October?
November 5, 2006 at 10:13 pm
Liekkiön loki » Sattumia ja kuulumia harhateillä
November 6, 2006 at 8:33 pm
Inscrições » Mudanças
November 10, 2006 at 8:02 pm
the (anti)dote » Blog Archive » New blog location!
November 12, 2006 at 11:32 pm
WordPress-to-WordPress Import v2.0 Released » Technology, Blogging and New Media
November 15, 2006 at 5:18 pm
Gormful » Blog Archive » Gormless to less.gormful.com to Gormful
November 15, 2006 at 6:16 pm
Tripod did it again « TheWheat Field
November 17, 2006 at 11:36 pm
CJCM and IT » Blog Archive » Hi..Welcome to CJCM and IT’s New Home
November 18, 2006 at 5:44 am
CJCM and IT » Blog Archive » Smooth Migration for CJCM2u.com
November 18, 2006 at 8:24 pm
Manu Khanna’s ramblings » Joined the Wordpress bandwagon
November 23, 2006 at 5:59 am
Notes from the biomass » Blog Archive » links for 2006-11-20
November 23, 2006 at 1:35 pm
Manu Khanna’s ramblings » Joined the Wordpress bandwagon
November 23, 2006 at 4:12 pm
Returned to Blogging « Free Software Blog
November 25, 2006 at 2:05 pm
Weblog title » Blog Archive » Slow and Sloppy in an Unsecured World
November 27, 2006 at 9:59 am
rizzurant.web.id « Yesterday never back
November 27, 2006 at 11:02 am
A Day of Import « The Other Hamarana
November 28, 2006 at 9:01 am
Moving from Wordpress.com to a Hosted Wordpress Installation » Another Blogger
November 30, 2006 at 1:14 pm
Keywords » Import
December 1, 2006 at 10:29 pm
frag-den-nerd.de » Blog Archive » Wordpress in Wordpress importieren
December 5, 2006 at 2:02 pm
blog.marjetica.info » Enostaven WordPress backup/restore plugin
December 5, 2006 at 6:52 pm
[2006/11/29 - 2006/12/06] « Kirin Lin
December 5, 2006 at 11:35 pm
SL-Hochwasser nimmt ab » LawsOfForm
December 11, 2006 at 4:53 am
Thisend’s Temple » Blog Archive » Trasferimento da wordpress.com a dominio personale
December 14, 2006 at 9:20 am
網頁更新進度報告at Niise’s 生活札記
December 15, 2006 at 1:01 am
Recommended reading for December 12 - Blogging Expertise - blog design, installation, and consulting
December 15, 2006 at 9:24 am
Praval’s weblog » Blog Archive » Finally, A proud wordpress.org user !
December 18, 2006 at 4:22 pm
De la continuité… : L’esprit d’escalier*
December 19, 2006 at 12:31 pm
crazy shit. » Blog Archive » …and it only took 3 months!
December 20, 2006 at 10:28 pm
about:blank » Blog Archive » Bem-vindos ao quase novo about:blank
December 24, 2006 at 12:38 am
about:blank » Blog Archive » Bem-vindos ao novo about:blank!
December 24, 2006 at 12:52 am
tecosystems / links for 2006-12-24
December 24, 2006 at 1:28 am
SaMi’s Blog » 備份wordpress文章
December 24, 2006 at 11:31 am
narrowband.org » Blog Archive » Look Ma, No Imports!
December 26, 2006 at 10:57 am
girlrobot » Blog Archive » How To Move Your Wordpress Blog To Your Own Domain
December 26, 2006 at 9:49 pm
cre8d redesign | cre8d design: blog design, Wordpress themes, Drupal, Web 2.0
December 28, 2006 at 5:41 am
WordPress Conversion at Aeonscope
December 29, 2006 at 6:25 pm
I Dream Awake » Blog Archive » Hello world!
December 31, 2006 at 7:55 pm
Bulles de vie » Changement d’hébergeur
January 2, 2007 at 11:57 am
Pink♥Sugar » Hello!!!
January 9, 2007 at 9:30 pm
freakBLOG Beta
January 10, 2007 at 1:19 pm
Jeff McNeill » Blog Archive » links for 2007-01-10
January 10, 2007 at 6:59 pm
Bruno’s blog » Blog Archive » My blog is moving to WordPress.com
January 11, 2007 at 9:53 am
SharpCraft » Blog Archive » Wordpress.com posts moved over
January 11, 2007 at 9:45 pm
Unikram, Paper, Recherchen & Software » Erreichbarkeit mancher Artikel
January 12, 2007 at 7:25 pm
Verhuizing at www.GuySie.nl
January 15, 2007 at 12:55 am
History line at Style.overSubstance
January 15, 2007 at 1:18 am
MeIrz » Возвращение блудного сына.
January 15, 2007 at 10:31 am
Internet Marketing 4 Noobs » Woo…Wordpress admin area up and running nicely.
January 15, 2007 at 11:41 am
ranchochase.com » Blog Archive » Rancho Chase begins the move
January 18, 2007 at 11:22 am
WordPress, MySQL Türkçe Karakter Problemi | Hus Weblog
January 19, 2007 at 2:11 pm
Stuff by Sarah » What I’ve been up to
January 20, 2007 at 10:17 am
Got hosting : The Far Corner
January 21, 2007 at 1:07 pm
10 Things You should Know About WordPress 2.1 » Technology, Blogging and New Media
January 21, 2007 at 5:48 pm
WordPress 2.1 - eindelijk at Enthousiasmeren
January 23, 2007 at 2:16 am
notes - » Nanowo
January 23, 2007 at 8:31 am
Learning Reiot » Blog Archive » Wordpress 2.1 업그레이드?
January 23, 2007 at 12:31 pm
HAKKICEYLAN » Blog Archive » Tekrar Merhaba dünya!
January 27, 2007 at 10:21 am
Got hosting! at The Far Corner
January 29, 2007 at 3:52 pm
» Blog Archive » Upgrading WP 1.5.1.3 to WP 2.1
February 3, 2007 at 12:07 am
Emmense » Moving One Category to a New WordPress Blog
February 4, 2007 at 4:02 pm
A Word of Caution When Changing Domains | All Things Seen and Unseen
February 6, 2007 at 12:01 pm
Thoughtcatcher » Blog-Archiv » Der Thoughtcatcher zieht um
February 11, 2007 at 11:53 am
TechCrunch is Down. Michael is miffed » Solo Technology
February 12, 2007 at 9:22 am
The Lonely Marketer - a discussion for the small business marketing manager » 9 Steps To Moving Your Blog and Selecting Plugins
February 13, 2007 at 1:45 pm
Ronald Lewis Dot Com » Blogger: Move Your Blog To WordPress in 10 Easy Steps!
February 17, 2007 at 3:18 am
Make Easy Money » Blog Archive » Blogger: Move Your Blog To WordPress in 10 Easy Steps!
February 17, 2007 at 3:31 am
Bad Boy Blogger » Blog Archive » Part time blogging…
February 21, 2007 at 9:11 pm
subREVOLT: We like weird things. » Blog Archive » A word about possible weirdness today!
March 21, 2007 at 1:30 pm
stevienova.com » Backing up your Wordpress Blog Database From Wordpress
March 22, 2007 at 7:55 pm
myBabyBay.com » Blog Archive » Backup Your Blog
March 24, 2007 at 12:55 pm
Urban Spelunking » Blog Archive » Moving Wordpress Blog from ITP server to a Hosted Server
March 30, 2007 at 2:29 pm
How To Transfer A Domain - David Cowgill's Blog
April 9, 2007 at 2:07 am
a crank’s progress : migration notes: Moving Wordpress to Wordpress
April 22, 2007 at 11:55 pm
Flippant News » Off Topic:: How to move Wordpress blog, from one site to another
May 13, 2007 at 5:19 pm
Der wilde Garten | links for 2007-06-03
June 2, 2007 at 9:27 pm
Wordpress to Wordpress Migration « The Digital Dilemma
June 9, 2007 at 10:41 am
Abiyasa Blogs » Blog Archive » My Indonesian Blog
June 30, 2007 at 5:51 am
No old Blog. No New Blog. There’s only one blog. | GreySquare Blog
October 28, 2007 at 6:08 am

{ 262 comments }

1 Daniel Black April 7, 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 May 27, 2008 at 3:00 pm

Thanks for this useful plugin.

3 radyo May 31, 2008 at 5:31 pm

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

4 felix June 2, 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 June 9, 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 June 10, 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 June 10, 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 June 15, 2008 at 10:29 am

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

9 Joanne July 2, 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 July 2, 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 July 3, 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 July 22, 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!

Comments on this entry are closed.

Previous post: Happy Birthday, America

Next post: Interviews