Jul
27

How to Split Large XML Files for WordPress

4

When you want to migrate your WordPress to a new host or server, you may have trouble transferring your backup data, mostly existing content. You may have a large backup file but WordPress limits you to import backup files of only 2Mb in size.

XML Splitter

There is no other way to complete the migration but to have your backup files sized less than 2Mb, which is almost impossible especially with files that have already exceeded the size. What you can do though is split the file into chunks of smaller sizes.

In this tutorial, we will show you how, using two different methods.

Splitting XML files on Windows

If you are on Windows, you can use WXR File Splitter.

Now go to the WXR File Splitter page and download the program. There is no installation required, you can use it immediately on your computer.

WXR Installer

Once opened, you will see the WXR File splitter window. Click on the ‘Open WXR File’ button to import your large XML file, then click on the ‘Split File’ button to start splitting your large XML file.

WXR File Splitter

Once the file is split, you will see the result in an opened window of the file location.

WXR result

Splitting XML file on Mac

To split files on your Mac, you need to use a different and simpler script written in python called ‘mainSplit’.

Now go to the intro page and at the botton of the page, download mainSplit.py script. Make sure to download the file in (.py) extension and not (.txt) extension.

Once downloaded, open Terminal console that’s available from Application > Utilities folder on your Mac and enter the following line:

python mainScript.py

Mac Terminal

Running the line will open a small window of ‘WordPress XML Splitter’. Click on button ‘Browse File’ to select the XML file you want to split, and then select the folder you want the file to be saved to by clicking on ‘Browse Dir.’

When ready, click the ‘Start’ button and the processing will start immediately.

mainSplitter

To check the split files, go to the directory you have selected earlier, and you will see a collection of files, not more than 2Mb in size each.

mainSplitter output

4 Comments to “How to Split Large XML Files for WordPress”

  • stealspartansbcglobalnet September 23, 2013 at 4:02 am

    Long story short i restored my iPod Touch and lost my vacation pictures. I right clicked my iPod in iTunes on the left side to restore from backup and can’t find the synced file before i accidentally restored it. i know there’s programs to find backup files on your computer but i couldn’t find the right one. I have windows 7. Please help!

  • mmminja September 27, 2013 at 1:22 am

    Having had my last computer dramatically explode, I am at a loss as to the way to go about recovering my supposedly ‘backed up’ files from when I used Byki. I did take backups (quite regularly), but I have no idea where they have gone.

    What I need is for someone who uses Byki who hasn’t changed the default location of their backup files to tell me where they are located by default. I am getting very wound up and want my Byki progress back!

    Thanks!

  • The Villain November 22, 2013 at 6:09 am

    I have two Windows BackUp files from two separate hard drives (separate PC’s too) and I was wondering if I can load them both onto one single machine (which is a different PC again to the ones the BackUp file came from), or will one file just overwrite the other?

    Quick responses appreciated
    :]

  • stephen m November 27, 2013 at 5:50 am

    Is there any free software available to backup files, folders automatically to other destination at allocated time? Please do not give rubbish answer and only yes or no answer otherwise I would report the same.