What Does the LUXCM-Only File Format Actually Do?
- .wpmpx Format Explained—Why I Built a Proprietary File Format and How It Differs from WXR (.xml)
- Base64 Doesn’t End with a “33% Penalty”
- Upload limits are not theoretical—they stop real people from migrating their sites.
- Parsing XML is itself an attack surface.
- Verifying uploaded files was not just an XML problem.
- To sum up,
- References
.wpmpx Format Explained—Why I Built a Proprietary File Format and How It Differs from WXR (.xml)
I abandoned WordPress’s standard WXR (.xml) export format and built my own binary format, .wpmpx.
I didn’t do it simply because I wanted something of my own. I made that decision after examining three specific problems that arise the moment you try to move media files in a text-based format such as XML: encoding overhead, upload-size limits, and security vulnerabilities.
In this article, I’ll examine each of those problems, explain the evidence behind them, and show how .wpmpx addresses them in practice.

Base64 Doesn’t End with a “33% Penalty”
Whether you use XML or JSON, binary files such as images and video must be encoded in base64 before they can be embedded in a text-based format.
The overhead from that encoding is mathematically fixed.
As this article on the space overhead of base64 encoding explains, “to send 3 bytes (24 bits) of information, you have to use 4 bytes (24 bits)”—which means the data can become up to 33 percent larger in theory.
But rereading that article made me realize that one important qualification needed to be made.
That conclusion is correct, but it depends on an important condition: for gzip to be effective, the data being compressed must still contain “uncompressed repeating patterns.”
The media files I work with—JPEGs, PNGs, and MP4s—are already highly compressed formats in their own right.
Expanding compressed data into base64 and then compressing it again with gzip does not bring back patterns that have already been removed.
With text content, gzip can recover much of the space lost to base64. But in migration files made up largely of photos and video, I found in practice that there was little recovery to expect.
And this is not just a disk-space problem.
The 33 percent expansion becomes especially painful when the same data exists in several forms in memory at once. There are moments when the original file bytes, the enlarged base64 string, the JSON array containing that string, and the option string created by serializing that array all occupy memory simultaneously.
I ran into this problem myself while exporting a media-heavy site.
There is no opportunity for the encoding, decoding, or the resulting 33 percent penalty to occur in the first place.
Upload limits are not theoretical—they stop real people from migrating their sites.
I built the split-export feature for a practical reason, not because of an abstract concern.
A roundup by WPBeginner includes concrete figures from users who encountered this problem firsthand.
One user tried to upload a 20MB XML file to a hosting account with a maximum upload limit of 32MB and ran into an error.
Another user had a 121MB file, while the hosting provider allowed only 62MB.
As the article points out, “the limit varies from one hosting provider and plan to another.” In other words, a migration can be blocked simply because the hosting account’s upload limit is low, even when the file itself is not exceptionally large.
There are two common ways to deal with this problem.
One is to ask the hosting provider to raise the limit temporarily. The other is to use a separate tool to split the file into multiple parts.
Neither struck me as an ideal solution.
Most users on shared hosting cannot change the hosting limit themselves. Using an external splitting tool, meanwhile, creates another manual task: the files must be divided and then reassembled in the correct order on the destination site.
So I built the feature directly into the plugin.
If even one part is missing or duplicated, the system reports it immediately.
My goal was to make the process adaptable to any hosting upload limit simply by adjusting the size of each part.

Parsing XML is itself an attack surface.
I consider the third reason the most important.
As long as legacy WXR/XML files must remain supported, I cannot eliminate the XML parser entirely. But continuing to use an XML parser is far from a trivial choice from a security standpoint.
The clearest example came from WordPress core itself.
According to Sonar’s analysis, WordPress 5.7 contained an XXE (XML External Entity) vulnerability, CVE-2021-29447.
A user with author-level access—someone permitted only to upload media, for example—could exploit the vulnerability simply by uploading a WAV audio file containing malicious XML in an iXML chunk.
The attacks that were possible included reading internal server files such as wp-config.php, which contains database credentials, and inducing the server to send arbitrary HTTP requests on the attacker’s behalf through SSRF.
Even when the result was not displayed directly on screen, an attacker could exfiltrate the file contents through DNS or HTTP requests—a “blind XXE” attack.
The root cause was an assumption that, in a PHP 8 environment, it was safe to omit the libxml_disable_entity_loader(true) safeguard. In reality, entity substitution was re-enabled because simplexml_load_string() was used with the LIBXML_NOENT flag.
Sonar’s conclusion in this case is clear: “Disabling external entity processing at the configuration level entirely” is a one-line defense that eliminates the entire class of XXE vulnerabilities.
That case made me take seriously the fact that even WordPress’s core development team failed to maintain this protection correctly during XML parsing, resulting in a real vulnerability.
That is why, whenever .wpmpx parses a legacy XML file, this protection is mandatory rather than optional. Before parsing begins, the uploaded file’s <!DOCTYPE> declaration is removed, and the XML is read only with external entities and network-based entity loading disabled.
I do not trust the assumption that a file is safe simply because “only an administrator will upload it.”
A compromised administrator account, or a malicious collaborator with administrator privileges who uploads a tampered export file, is a realistic scenario. The fact that this protection was once missed even in WordPress core reinforces that point.
And using a proprietary format such as .wpmpx avoids much of this problem from the outset.
.wpmpx first validates the file using a fixed magic-byte signature and checksum, and only then begins processing. Its metadata is read as gzip-compressed JSON rather than XML.
I keep the XML parser itself behind a narrow passage used only when importing legacy .xml files. I have reduced the attack surface to this “narrow channel left open occasionally for compatibility,” and XXE protection is always enabled within it—this is the structure I chose.
Verifying uploaded files was not just an XML problem.
Beyond the format itself, I also treated the process of verifying that an uploaded file came from a genuine request as something that could not be taken lightly.

The folder is automatically cleaned up immediately after each file is processed.
This is separate from the fixed signature and checksum validation. It answers a different question: “Was this file actually uploaded as part of this request?” I decided that these two checks—verifying the file’s origin and verifying its contents—should remain separate rather than being combined.
To sum up,
At first glance, .wpmpx has a simple structure: “magic bytes + compressed metadata + binary sections.” But behind that simplicity are answers to three real-world problems.
I did not create this format simply to have “something of our own.” I created it to close off, one by one, the points where standard formats fail in real-world use.
References
- Lemire’s Blog — What is the space overhead of Base64 encoding?
- WPBeginner — How to Split Large XML Files in WordPress
- Sonar — WordPress 5.7 XXE Vulnerability (CVE-2021-29447) Analysis
This article was designed using DECOBLOCKS.
