How to Split Large XML Files in WordPress


WordPress comes with built in import/export functionality that allows you to import or export your WordPress posts in XML format. When moving your site from to and in other transfer scenarios, sometimes these export files are larger than your web host’s upload limit. In those cases, you really have two options. You can either ask your WordPress web hosting provider to increase your maximum upload limit. The second option is to simply split your large XML files into multiple smaller files, so you can upload them one by one. In this article we will show you how to split large XML files in WordPress.

Automatically Split Large WordPress XML Files

Even though you can manually split your large XML files by creating multiple XML files with the same header, category, and footer information and dividing the rest of the items. But who has time for that? There are really nice free tools that allows you to split your XML files with just a few clicks.

For Windows users, there is a tool called WordPress WXR File Splitter. Download and run this utility. When you run this program, you will see a screen like this:

WordPress XML Splitter utility

Click on the open WXR file button to open your WordPress XML file. This tool will then read your XML file and show you some useful information about the data in it. It will get the header, the footer, and it will show you the number of items in the file.

You can adjust the size limit for when you split your large file into smaller ones. Alternatively, you can provide the number of files you want this to be split into. Either way, the goal is to get the files to be small enough, so you can upload it on your host without surpassing the limits. Finally when you are ready, press Split Files button, and it will split the files and store them in the same folder as your original WordPress XML file.

For all you Mac users, you are not left out. There is a similar WordPress WXR Split utility available for Mac users. It does the same thing, splits large XML file into smaller file sizes.

Mac WXR Splitter

We hope that this article helped you split your large WordPress XML files, so you can import them into your WordPress. Let us know if you have any questions by leaving a comment below.