WordPress is arguably the most popular CMS in the world. Many people convert HTML to WordPress websites or migrate from other formats to take advantage of its numerous user-friendly features. Most website management tasks can be easily done on the website but some things need technical knowledge. Transferring large XML files is one such issue which needs a technical approach.
The problem is commonly seen while migrating an existing website to WordPress or during shifting from WordPress.com to WordPress.org. The platform has functionality for importing content in XML formats but the large file size acts as a hindrance. Splitting the large files remains the only viable option as compared to paying extra for increasing the upload limit. Users can manually break the file into various parts with the same header, category, and footer data. This will consume a large amount of time, though and therefore we will use a tool for the purpose. Let’s take a look at the two methods- one for Windows users and the other for Mac users.
1. Split XML Files On Windows
We will take the help of a tool called WordPress WXR File Splitter. Users must ensure that the .NET 2.0 framework is installed on their system before starting the process. Let us now discuss the steps involved in breaking an XML file with this product.
Go to the WXR File Splitter page and download the product. There is no need for installation and the tool is ready for work after download of the files is complete.
Run the program and you will see a field for entering the location of the file which needs to be split.
Click on the “Open WXR File” and select the XML file from your system. If the program successfully imports the file, it will display the size of the file. Some additional information about the header and footer apart from the number of posts/ pages will also be displayed.
You can now set the size limit for the smaller split files. Remember to select a size which is below the maximum upload limit of your web hosting service. You also have the option of choosing the number of files in which the main file will be broken. This will automatically set a size limit for each file.
Once all the selections have been made, click on the “Split Files” button at the bottom of the page. The tool will start breaking the large file into smaller pieces. After the completion of the process, the split files can be found in the same location where the main XML file was saved.
This completes our easy method to split XML files for WordPress website owners who use Windows systems.
2. Split XML Files On Mac
We will now discuss the process of breaking up XML files for Mac using WordPress website owners. The same program that we used in the earlier method cannot be used when working on Apple systems. We will adopt a different approach for conducting the process for Mac systems. A script written in Python called mainSplit.py will be used for the purpose. Following are the steps involved in the process:
Download the mainSplit.py script. Take care to check that the file with the “.py” extension is downloaded and not the one with “.txt” extension.
Go to Application> Utilities folder of the Mac and open the terminal console after the file has been downloaded. Enter the following line on the terminal console:
Once you run the code, a separate window of the WordPress XML Splitter will open. Locate the tab “Browse File” and click on it. Select the file that needs to be split from your system. Just below the “Browse File” field, you will see the “Browse Directory” option. You can choose the location where the split files will be saved by clicking this button.
When you have made the appropriate selections, click on the “Start” button at the bottom of the window. The process of breaking the files into smaller pieces will begin immediately. After the completion of the process go to the selected target folder. You will find the smaller files saved there. The splitter divides the large file into smaller pieces none of which exceed 2MB in size.
This concludes the process to split large XML files for Mac users.
A major concern of people looking to migrate a website from another platform to WordPress is to ensure that their valuable content is not lost in the process. The above-mentioned methods to split XML files for WordPress website owners using Windows or Mac systems will be helpful in transferring an interface easily and quickly.
Brandon Graves has great expertise in WordPress website development services. He works with a HireWPGeeks (best known for convert html theme to WordPress company) in the California, USA. You can get his articles and latest publications totally free by following him on Facebook.