WordPress XML Splitter (again!)
In the last eight months or so I’ve been getting plenty of e-mails asking for a copy of the mainSplit.py Python script I wrote ages ago. It basically takes in a large WP backup XML file and splits it in to chunks of less than 2mb. Apparently some tech blogs also linked to the previous website where the script was hosted but since that site is pretty much dead for some time the script also doesn’t exist. The Python script works well with all operating systems but I believe there are other alternatives for Windows users. For Mac users not comfortable with Terminal, I’ve wrapped up the script in an app using Platypus. I am putting up the script back here again together with the OS X app and both these files can be downloaded using the links below.
Python mainSplit.py script
OS X application: WP XML Splitter
(Image Source: Centennial Arts)
Hello Anasimtiaz,
Thank you for this script. Unfortunately when I run it on a 36MB file it has generated 25,586 separate little files!
Toby
If you still haven’t solved the problem I am happy to have a look to see what’s going wrong.
I’m having the same issue Toby was having – I’m ending up with 40,000 tiny files. Help!
Hi Anasimtiaz, I havent been able to splt a file using your method
Sorry for the last question, was cut off, I am trying to split a XML file on a mac, for some reason some how i havent been able to do it, any help I would really appreciate it
Thanks
I have changed the fork of this script ( https://gist.github.com/danielwrobert/6c9ca8de8199d5430621f481673d4baa ) to run on the command-line and removed the graphical interface. Also note the added shebang `#!/usr/bin/env python3`
https://gist.githubusercontent.com/Patrick-1994-/acd41c084790aa9d07499b9a76245891/raw/add199b1fc8a6a028a5187cfb281d6961294a68c/wordpress-xml-splitter.py