How to Split Large XML Files Before Uploading to Your WordPress Website

Whenever you try to migrate the content of a website to another, you have your hands on an XML file. I hope you know the import and export process.

If you read in some WordPress forum, the most commonly asked question is about getting an error while importing the XML file.

I have an answer, you should know, the WordPress importer has an XML file upload limitation, it's only 2MB. Some users might try to use plugins like WP Clone, which also has a file upload limit of 2MB.

Depending on the different circumstances, you require to find a better way to upload a file bigger than 2MB.

If you have a website with 500 blog posts, the XML file you export is more likely to be bigger than 10MB, and as I have mentioned, you can't import a 10MB file in a 2MB space.

In such a situation, you need to split the XML file into small files and upload them one by one.

This tutorial is going to provide you with the easiest way to split a bigger XML file into smaller ones. You may be wondering about having an operating system, well, this tutorial is for Windows users.

If you have Mac, you can easily find a different tool.

Find a Convenient Tool to Split an XML File

It's obvious that you require software to accomplish your goal. If you're thinking about any plugin to split an XML file, don't waste your time.

Follow these steps.

Step 1

Download WordPress WXR File Splitter from its official website. You may be thinking as if how can this old tool work, well, try it and you will thank me later.

How to Split Large XML Files Before Uploading to Your WordPress Website

You will have a ZIP file on your computer, open it to extract and you will see a WXRsplit.exe file, extract it to your computer.

Step 2

The beauty of this tools is that you don't need to install it, you can use it directly. Click on the extracted file, and you can see the WXR File Splitter.

Step 3

As you can see, there are two steps, from step 1, you have to use the button to choose the XML file you have imported from your WordPress website.

How to Split Large XML Files Before Uploading to Your WordPress Website

In the second step, you can see the default file size of the file to split into parts, by default, it's set to 2MB, you can change it less than 2MB.

I would say, 1.99MB is excellent so that you can import the smaller files easily.

Step 4

As you can see, the file size of the main XML file is 22MB, which has been split into 12 parts. As I have said before, you could change the size of the files to divide into many pieces.

How to Split Large XML Files Before Uploading to Your WordPress Website

You could have 22 parts by selecting 1MB for each file, and it's the matter of choice.

NOTE: You need to make sure, you don't choose the file size bigger than 2MB.

Step 5

Depending on your file download location, you can see all the smaller files on your computer.

How to Split Large XML Files Before Uploading to Your WordPress Website

As now, the size of each file is 1.99MB, which is smaller than the default file upload limit, you can easily import these to your another website.

Congrats, you have successfully split a bigger XML file into many smaller files.

If you're using Mac, you can search for "WordPress WXR File Splitter for Mac," it's similar to the Windows file splitter.

Have You Ever Checked the XML File Size of Your Website

Most of the WordPress users don't consider checking their websites, but when they try to clone it, migrate it, they face such a problem.

In the last couple of years, many people have migrated their website from WordPres.com to WordPress.org, or the other way around.

I remember when I was trying to merge the content of two different websites back in 2014, it was a disaster. I didn't have any idea about splitting an XML file.

Well, at least you do now, give it a try on your local environment.

Conclusion

Once in a while, the issue like getting a warning while uploading an XML file occurs, and most of the people freak out.

Well, it's pretty normal, you just need to know that WordPress doesn't allow you upload a bigger XML file at once, so use the above method to split it into smaller files and enjoy.

I hope you can easily accomplish such a task.

Check out these top 3 WordPress hosting services:

Was this article helpful?