This past weekend, I finally had the chance to unveil the new blog design for Jeffro2pt0.com. Because of the new design, I figured it would be a good time to reformat my WordPress installation similar to how you would reformat a PC to place a new installation of Windows on it. This gave me the opportunity to use the built in WordPress Export/Import migration tools.
WordPress eXtended RSS:
Because I didn’t want the trash in my current WordPress database to be inserted into the new database, I chose to export my content via WordPress into an WXR File. WXR stands for WordPress eXtended RSS. This WXR file will contain your posts, pages, comments, custom fields and categories. Even though it’s not officially listed as exporting your tags into the WXR file, the tags ARE included. In my case, I was exporting my content from a WordPress install that was at version 2.3.3 to a fresh install of 2.3.3. I’m not sure if earlier versions of the WordPress Exporter actually export the tags, but if you know the answer, let me know by leaving a comment.
Exporting only the CONTENT portions of my WordPress database into this WXR file saves me from having any of the trash that was within my database being inserted into my fresh install of WordPress. The export process produced a file that came in at 3.2 megs in size.
Once I jotted down a list of all of the plugins I knew that I wanted to have installed, I did a fresh install of WordPress. Let me say that, I was very surprised to see just how fast the WordPress front/back end loads with only 2 plugins installed and activated. I was tempted not to install any plugins, but alas, I trudged on.
The Import:
After installing a fresh copy of WordPress, I clicked on Manage-Import. I noticed that import files had to be 8 megs in size or lower. This is probably due to the php.ini file setting for the size of scripts that can be processed on the server. Some servers set this to 2mb while others such as AnHosting (My Webhost) appear to be a little more lenient. If your file is more than the hard coded limit, I believe you can over ride the settings via some entries in your .htaccess file or you can split the WXR file into multiple files. If I am wrong, please correct me in the comments.
Tags As Numbers Uh Oh!
After my data was imported and I checked out the front page of the blog, I noticed something strange. All of my tags had turned into numbers! They functioned as normal, but everywhere there was suppose to be a tag ended up being a TAG ID number instead. A quick search on the WordPress support forums brought me to THIS FORUM POST which explained the problem.
The current version of the WordPress exporter has a problem where it incorrectly exports the tags. The fixed WordPress exporter is already in the trunk and will be shipped with WordPress 2.5. However, thanks to Otto42 for linking to the fixed file, I was able to download the fix and apply it to my local WordPress install. The bad news is, I had to delete all of the data that the previous import put into place. However, after applying the fix, I re-exported the data from the database and then re-imported the data to my live WordPress blog and my Tags were now WORDS instead of numbers.
After the import was in place, I went through my check list and reinstalled all of the plugins that I found that I actually use. After that was finished, I had a fresh install of WordPress with fresh installations of ONLY the plugins I found valuable to my blog. I hope by now, you sort of get the drift as to why I explain this as reformatting WordPress.
Things I Learned:
Because I performed the first and second import on a live blog, this sent feed readers that were subscribed to my blog into a frenzy as it looked like my blog had over 400 new posts.
In my blog design, I like to use the EXCLUDE parameter for the wp_list_pages function. Because the importing reassigns ID numbers to all of your posts, pages, comments ect, my exclude parameter broke. I had to manually reassign the ID numbers to the exclude parameter so they matched up with the appropriate pages.
I lost my Akismet spam tracking. Before I did the reformat, Akismet had blocked over 12,000 spam messages on my blog. Because of the fresh install of WordPress and the WXR file not exporting that data, my Akismet stats have started over.
I had to re-configure a number of settings. Not everything is exported into the WXR file, so be prepared to re configure your blog if you do a fresh installation.
Your Experience:
The WordPress Codex currently has 28 different articles for explaining how to migrate content from one system to WordPress. This includes migrating from popular CMS’s such as e107, Mambo, TypePad, Typo and even WordPress into WordPress. I’ve noticed plenty of people stopping by the WordPress IRC chat room requesting assistance due to a botched export/import. Have you had the chance to go through the export/import process? If so, please share your experience in the comments below.
When I’m backing up, I always crack myself how all the blood, sweat, writer’s block, and carpel-tunnel end up being smaller than my wallpaper.
Sounds like I should wait until 2.5 to do my start from zero. Thanks for blazing a trail.
Same thing happened to me, but it was a blog for WordPress theme demos so I didn’t think much of it. Thanks for bringing this up. I bookmarked Otto42’s response.
I’ve done the erase and install before and it’s stressing to say the least. What’s even more scary is moving hosting providers. I did that not too long ago and I prayed I wouldn’t lose anything. I ended up not losing anything and it was a perfect migration. Thanks be to WordPress for being built so well.
Thanks for the comments guys, I appreciate it. @Small Potatoes I know of other theme designers who have run into the same problem as you. They set up demo sites and the tags have turned into numbers. They know it’s an issue with the import/exporter but I guess most theme designers didn’t know of a solution.
The good news is, this will be a bug fix that comes with 2.5
Yes I’m feeling the urge to clean house as well but I’ll wait for 2.5 to do it.
I too had to go through a similar exercise of moving from old platform to a new one of my webhost. I used this Import/Export feature in 2.3.2 and had no trouble in doing it what so ever.. it is a very useful and cool feature! Thanks WP π
i did pretty much the same thing. Surprisingly, Database shrank from 20megs to just around 8. quite surprised actually.
I had a lot of trouble with importing a WXR file – the biggest problem being it doesn’t import all the posts at one go. I’m not sure if this is because of the php.ini setting. The only workaround I could find was to edit the file and remove already imported posts and save the file under a new name (Blogged about here)
I hit the same Tags as IDs problem when I recently switched my blog to a new domain. Figured I must have screwed something up in the export and resorted to fixing it using Simple Tags. Now I’m kicking myself and wishing I had waited till you posted this article π
“a born fool” π that’s my new name;)
I can’t count the numbers of migration I’ve done for customers. Often after midnight, because I know if they can see that all crash before the migration is over their heart stand still π
But to “kill” my “baby” my little webdesign-in /shocking – the whole wide world would stand still and my heart too.
I lop and top the database of webdesign-in every six months. But I can’t delete it. To click *drop table* my fingers stand still. π
So call me a fool – because I know that WP does an excellent job if someone would do this. But I can’t do it on my own little “baby”.
with more than one blink in my eyes
kindly regards
Monika
I did wp export/import twice, moving my blog across domains. But with the first time experience, I made a How To post, which I followed in my subsequent transfer. It went like a breeze. But the recent transfer resulted in tags becoming numbers.
Cheers,
Arunn
the first time i tried to refresh my installation, i forgot to save wp_content/uploads … and all the attachment image is gone forever ..
lessons learned: don’t forget to save wp_login.php and any files we changed manually plus that attachment folder before you do anything fool ..
now i prefer refreshment using database back-up.
Hi
the export function doesnot safe the blogroll or link categories.. or does it.. I haven’t found them?
kindly regards
Monika
The smaller size of your database is due to the comment spam not being exported.. also the options of the old plugins you don’t use anymore are not transferred..
I have transferred my blog a few times – losing some character formatting – having them come up as ? in my wordpress comments, due to mysql database formatting differences between my hostings. I haven’t used wordpress’ export/import feature yet, though it sure does seem tempting π
Perhaps I miss the point, but other than migration – why would you do a fresh install? Does it do any good for your site? I always felt WordPress did a good job at organizing data so that there was no … weirdness … going on in the db. The only thing I do to my database these days is run a weekly optimize to keep things running nice and the size of the db down.
So .. why?
I talked about my own experience on my blog. The real show-stopper for me was the renumbering of posts. That caused all sorts of things to break. I eneded up copying the posts table (and a few other tables) from the old databse to the new database. It is detailed at the bottom of my post at the link above.
Hi all
Some days ago I moved my WordPress to a new server. There I made a new installtion with 2.3.3 (table names with xy_… as in the old). The wp-export from the old server with 2.3.2 was no problem. But the wp-import to 2.2.3 was more or less a desaster. So I left the wp-Export/import function and tried a very basic way.
On the new server then I used the table names wp_… So,then I exported via MySQL admin all tables to a *.sql (table names xy_ as from the old server). Second, I imported via MySQL the *.sql to my new server. After it in my new db I had all xy_..- tables beside the unused wp_… tables.
Of course, the new system did not work. In wp-config I replaced the basic data with the new one, i.e. table name xy_… Also I had to install all missing plugins as I had on the old server
Result: WordPress works without any losses.
@17
I’ve forgotten something: My old server was equipped with MySQL and php 4.x (both) – the the server runs with V 5.x (both).
Re-exporting your data from the old blog was not necessary, the tag bug is in the importer. Fixing the importer and then importing would have gotten your tags.
Monika: You can get the Blogroll in an OPML format by going to http://example.com/blog/wp-links-opml.php (use your site info, of course). This can then be imported into the Blogroll on the new WordPress installation.
oh Otto thanks a lot, π I would like to use this for others…
my 123 linkcats to different post ids .. /big eyes..
to reconstruct all this … never ever in this life π
kindly regards
Monika
I’ve migrated my blogs several times, from MovableType to WordPress, WordPress to WordPress, and WordPress to WordPress MU — the most recent being a forced upgrade from WordPress 2.1.2 to 2.32.
I haven’t bothered with doing WP exports, relying solely on SQL dumps and re-imports via phpMyAdmin. The manual process is a huge pain, and you really have to have a good understanding of the database structure, but I feel much more comfortable with quality and reliability doing it myself. ‘Course, I’m also the kind that uses a text editor in which to develop rather than an IDE for the same reason!
On the plugins front, I totally agree, and I periodically look at my plugins to see if I really need them. Most of the time, however, I do! The biggest problem in my opinion is that many plugins developers have the Microsoft mentality: shove every feature and option possible into the plugin, making it unnecessarily bloated and more processor intensive. Granted, I myself need to take more advantage of caching in my own plugins (such as the Devowelizer), but I think Remove Nofollow is a good example of KISS.
On the flip side, there are some massive, well-integrated plugins such as Simple Tags that really rock! I have 16 plugins activated (11 written by others), and about another half dozen I’d like to add but won’t until I remove all the unneeded features, rewriting them from scratch.
Thank you for this wonderful post! And thanks everyone for the comments. It helped me fix my site! π
I tried to get around a fresh install by having a local installation mirroring my domain installation. Unfortunately, some plugins only work (or correctly work) at a domain. It’s also not possible to completely duplicate a domain configuration locally, for several reasons. You can’t just take an export from one installation and import it into another, for example, because of pathing. WordPress was written with a path in mind. A “path” meaning you install it at your domain, do some configuration, then blog. It’s designed with the idea of minimal screwing-around: just blog. And so the kind of technical screwings-around that many of us like to do, will cause anxiety, aggravation, and lost blogging time, if not a lost blog. But, hell, it’s all to have fun, il n’est pas?
I used WP’s Import/Export feature to transfer two of my blogs from Blogger to WordPress, and later on to another domain. It worked beautifully every time. The only thing that broke was (obviously) the links to images that I also moved. The images I’d uploaded through WP were fine, and I was kicking myself for having done so many manual image uploads. I’m still working my way through them!
I am not a code-jockey by any means, but I’ve done phpMyAdmin enough that I’d feel more comfortable manually deleting the unneeded tables.
I’d say the same as Ike. I just moved my blog to a different web server a few hours ago. The easiest and most reliable option is to use phpMyAdmin for export/import. You also have an option to only export some tables as well as splitting your exported database to more smaller parts. My db was 60mb and the limit for importing is 8mb. It took a bit of clicking but eventually all data got moved.
I didn’t have any problems and everything looked exactly the same as on the old server. All posts, pages, tags, … everything was there.
@Weathervane: I installed WordPress MU locally for testing plugins and themes before deployment by adding “127.0.0.1 whatever.dev” to my Vista HOSTS file and can now access my test blogs by visiting http://whatever.dev/ from any browser (but only on my PC, of course.) As long as wp_blogs, wp_site, and wp_NN_options (I think that’s it) are synced, should have no problems.
So this means I backup my current dB, apply patch, and restore the dataBase… would that work? I don’t think so π
same thing here. it mess up the tags and userdata.
long story short, it not safe dont depend on WXR export.
You could always edit your database manually and add 12,000 to whatever your akismet counter is right now. π
In the wp_options table look for an entry called akismet_spam_count under the option_name field.
@25: I had the same problem with my migration as well and did a fairly painful search & replace in the WXR file to fix it. Subsequently (and I can’t remember which blog pointed it out) I learnt of a Search & Replace plugin that should make this a lot easier in the future.. de
that last comment had an incorrect URI. If you’d like to, you can edit it to the correct one, which is displayed above.
I went thru many of the same steps merging two blogs- the tags imported as numbers… btn the wordpress categories to tag tool, leftover data from Simple Tags and UTW, Headspace2’s import capabilities and physically deleting the number tags from the terms tables it all worked out somehow
I hit a 2mb limit when I transferred hosts. At the same time I changed themes, upgraded to 2.3.3, trimmed down the plugins, and upon discovering that the posts were all re-numbered, I decided to switch to a name-based fancy permalink setup.
After trying php.ini file amendments, tech support requests etc., I ended up opening the xml file up, taking the basic structure as a template, and creating 3 new (small enough) XML files. Feel free to read a little more over here – . Wow, just checked it, and I really need to break up my text a little better, apologies. Thanks for the info, next time I’ll try out the MySQL route π
oops, sorry about the badly formed link there, please do feel free to correct it and delete this comment π
Migrating from Joomla to WordPress was incredibly easy for us over at PhoneNews.com. My only regret about the process was that we didn’t do it about six months earlier.
Thanks for letting me know how to remove all the trashy rows, etc. in a wordpress database! I was wondering if it’s possible to do such a thing. I wish plugins didn’t leave your database with unnecessary rows, etc.
Yeah, that bug in the tag importer got me too — but I had completely backed up my database, so I just said “screw it” and imported the necessary php tables. No muss, no fuss.
Thanks for this post and for the replies. I recently switched servers (read yesterday) and I have never done the import/export process. Everything seemed to be going fine but my export file was 8.7mb. I had my server administrator set the limit up from the default 2 to 10 and it still would not load.
Fearing the worst I got really frustrated because it kept giving me an error that there was no info in the file. I finally moved my blog back to my old server which luckily worked and then exported by author. This gave me a slightly smaller file since I had 2 extra authors and I was able to import with no problem.
I’m also on AhHosting and the limit is 2MB, while my WXR is 4.2MB. Any ideas on how to split or upload?
I’m really lost
Nice article by the way π
>> Meraj Chhaya
I’ve given some details on how I split the large file into parts, in the post I mentioned previously ( http://chrismerriman.com/blog-revamp-completed/ ). Take a look, and let me know if you need any further help π
OOPS! I just lost my whole blog maybe. I backed up everything, then deleted my whole database. Then deleted my whole blog because it was not running right, it kept reverting to the Kubrick template.
Now I did a perfect new install except all my archived content is gone. How do I find? Do I reinstall all the backups? Then see if I can figure out what you are talking about here? Well maybe someone will read this and have some help other than saying “it sucks to be you”.
Ok I answered my questions and now I have my blog back with my posts. YAY. Thanks to Alex Sysoef for pointing me in your direction. The import/export or export/import worked great after I reinstalled my datatbase and broken blog I was able to export the posts. Phew. Then I imported the file to my new updated blog with the new Data Base, and now it is functioning other than the fine tuning I want to do. It is great to have help around if you know where to find it.
i’ll try it, cause i feel my blog look so poor with standar. i hope it can be so nice. thx before…
Thank you for posting up this informative post! And thank you to everyone else who posted their help and comments. I wouldnt have a blog if you didnt post!
Thanks to ChrisM and all the others who posted. I think I got the solution to my questions on exporting .xml file from wordpress.
Thanks a lot.
Wouldn’t it be possible to do the exact same steps by backing up the blog with Cpanel?