Summer Sale Alert! Save 20% on WP Theme Bundle: 240+ WP Themes & 5 Plugins. Use Code "SIZZLE20"
Summer Splash Sale: Dive into 25% Off On All Our Premium WordPress Themes! Use Coupon Code "SPLASH25" at Checkout.

Here’s How You Can Split Large XML Files In WordPress!

WordPress comes with some default settings which can be obstacles in your way. WordPress has a fixed file size limit to 2MB. The XML file larger than that won’t be accepted. While transferring your website or blog to WordPress, you will have to export all the files and posts into an XML file. This file can be larger than the upload limit. The limit is universally set. You can’t extend it. So you will have to split large XML files in WordPress for the upload.

split large XML files in WordPress

Let’s take an example to understand it better! Let’s consider that you have a blog account on Google blogpost or WordPress.com. After creating quite a buzz about your content, now you want to migrate the site to WordPress.org.

Now, the migration requires you to make a XML file of all the posts and pages you have. Then upload it into WordPress.org. Obviously the file size will be large as its your whole work. So you won’t be able to upload it into WordPress.org because it exceeds the set file size.

Now you have to split large XML files in WordPress into small ones. How? Here’s how-

1. For Window’s Users:-

Before going into the process you should know everything about XML files in WordPress. After gaining all the necessary information you will know what to do. To split large XML files in WordPress there are two ways. The first one is automatic and second is Manual.

Of course the first one takes less time than the second. Manual process will consume more time. Obviously no one would want to spend that much time on only splitting large XML files in WordPress. But it is a consistent work. The manual process is time consuming but totally worth for the results.

To split large XML files in WP most users go with the free tools. These tools do the job automatically. For each operating system you will find different tools for the job.

For Windows users you will find a tool named WordPress WXR file splitter. First you have to download this application in your system. Save it on your desktop and run it from there. After opening the application you will see a window with all the steps you have to follow.

In the WordPress WXR file splitter application you will see a button for ‘Open WXR file’. Click on that button. It will redirect you to the XML files you have stored. These XML files are exported from your existing blogs. They contain all the posts in your website. Now select the XML file you want to split.

After selecting the XML file it will open in the application. The application will scan the file and analyze it. It will show you some necessary information about the file and the data it has. The application will show you the header and footer information, the number of posts and pages as well.

With the help of application you can set the limit of file size. This will split the large file into small one. You need to make sure that the size limit you set is lower than your web host has provided which is normally 2MB.

Along with this you will have the option to set the number of small files that you want the large file split into. For example, you can set the limit if you want the large XML file to split in two small files or more. After setting this your large XML file will be divided accordingly.

After making all the settings click on Split button. This will begin the splitting process. The smaller files will be saved in the same folder as the large file.

2. For Mac Users:-

As said before, the tools for splitting large XML files in WP differ with the operating system. For Windows users it was an application, for Mac users it’s a software! For this you will have to get the WordPress WXR split utility software exclusively available for the Mac users.

This software gives exactly same results as the application in Windows. For this first download the software into your system. Install it and run on the desktop.

When you will open the software a window will appear. There you will have to mention the maximum split size. This is the size of the small files in MB. After this right below that there will a button for Browse. Click on it and select the large XML file you want to split. You can also select the output folder if you want.

The perk of having this software is that it has a size limit for large file as well. It has certain size limit for large XML file that’s supposed to be split. That limit here is 1GB. A file size more than that would be unreadable for the software.

But we have a way out of it as well. In such case you will have to download MainSplit Script file. This is a script file written in python. It will split large XML files in small ones without any limitations. But make sure you download mainSplit.py and not mainSpplit.txt.

After downloading the file, go to Application. In the Utility folder open Terminal Consol. There in write these following lines-

~Admin$ python mainSplit.py   

After writing this click on Enter. The line will start working and open a window as WordPress XML splitter. Now click on browser file and select the Source file, the large XML file you want to split. Then go to output directory where the small files will be saved. To view them you will just have to click on Browse directory button. Then click on save and it will split large XML file in WordPress.

While using the mainSplit you should remember it wouldn’t ask you to set the small file size. It will split the large file into default sized small files which is set on 2MB. You can check the results in the output folder.

On VWthemes you will find clean WordPress themes ready to help you create stunning websites. Our WordPress theme bundle is available at a pocket-friendly price if you need a package of themes.