Wordpress WXR File Splitter
The other day I was setting up a Wordpress sandbox to do some theme testing and I ran into a small snag. I wanted to populate the blog with data from smmguru.com and the Wordpress export feature is a bit flawed. For many reasons (mainly security) I did not want the sandbox blog running off the same database so a backup/import was the way to go. Unless you can upload a 6mb export to your site (highly unlikely) then you cant import any data.
The first route I took was manually trying to split the file but I quickly realized it would take forever with that many lines of code. I took my problem to Google and found a nice little gem called “Shoes.” Its a WXR file splitter written in ruby by mvManila. The program is very easy to use and it runs on Windows, Mac, and Linux and there’s also a command line version for the nerds. You can get the latest version here (just pick the latest version number for whichever platform you are running.) The program will then install itself and your ready to roll.
Select the local copy of your WXR file, then pick how small you would like each chunk to be. You can even append a name that will automatically be ordered in number. For example entering “backup-part-” will create WXR files labeled “backup-part-1″, “backup-part-2″, etc. Then all you have to do is import all the files through WordPress and your good to go.