The MP-WP Weightloss Program

March 30th, 2019

This is the first patch in a series of slimming patches for mp-wp. The biggest savings comes from the removal of TinyMCE, a JavaScript library for rendering "WYSIWYG"1 text editing boxes for the types of users who might fall and hurt themselves if, god forbid, they had to write some HTML tags by hand.

Additionally, all importers were removed with the exception of the importer that handles files generated by the native WordPress exporter2. Other items removed include the Google Gears plugin3, as well as any "auto-upgrade" "features" that any self-respecting citizen of the republic would neither need nor want to use.

This patch was first published and announced in #trilema last week but has since been reground to fit on top of hanbot's latest. Overall this patch proved to be an effective first step in mp-wp's healthy new lifestyle, resulting in a 14% reduction in total LOC and an 18% reduction in size-on-disk (21% when comparing gzipped directories).

Before After Reduction
Lines of Code 162,594 139,205 14.4%
Bytes on Disk 6,053,039 4,962,628 18%

Patch and Signature


  1. The acronym omits what you really get, which is typically HTML tag spew in the generated output. []
  2. This may be worth removing later but I chose to leave it in for now so that one can at least export and re-import their existing mp-wp blog—and to keep as a reference in case someone eventually decides to re-write this functionality. []
  3. Some local caching scheme that they in any case gave up on in 2011. []
« Minor MP-WP Patch Updates
MP-WP Automated Testing Proposal and VPatch »


  1. MP-WP's "native" exporter/importer is a very sad pile of xml, which is not practically useful (the files generated end up too large on non-trivial blog for the php-based importer to be able to import) and incomplete (images, for isntance, are not included, thus you're still stuck bashing the server into obtaining a proper, useful archive).

    The only sane way to import/export MP-WP blogs is by doing a db dump of the tables and taring its directory structure.

    Do you have your version running anywhere I could give a gander ?

  2. admin says:

    Ah, I see. I'll mark it for deletion in the next patch then.

    This site is currently running on the latest patch, for a full week now. I copied over the changes from hanbot's patch manually yesterday, so those are in as well.

    I suppose I could make you a temporary contributor account on here to test out the post editing / image upload functionality -- if that's what you had in mind.

  3. That's what I had in mind.

  4. [...] billymg Do you read the logs? You should probably read the logs. « The mp-wp weightloss program [...]

  5. [...] bug was introduced in the previous mp-wp patch that caused encoded ("escaped") html characters to be converted back to their symbols after being [...]

  6. [...] mp-wp_remove-tinymce-and-other-crud.vpatch (billymg) (sauce) [...]

  7. [...] out what I'm missing I'd be happy to update this article. [↩]23k of which have since been snipped. [↩]wpautop can also be disabled at the theme level via the addition of remove_filter( [...]

  8. [...] if no one objects, the next patch will rip out js and whatever features depend on it. this will be similar in absolute terms (LOCs/bytes) to the first major round of trimming [...]

  9. [...] After the first, which removed TinyMCE. [↩]of these remaining bytes, about 220k are dedicated to empty [...]

  10. [...] lines removed from mp-wp, almost 30% and gets it under 100k lines (~97k). compare to previous round of [...]

  11. [...] was trimmed3, a feature was added, patches were produced, and in 2020 TMSR was closed. I had also at [...]

  12. [...] include support for other syntaxes besides UNIX diff files. [↩]Completion of the test suite, slimming patches, a proper theme or two, the addition of the new server-side select mechanism as a standard feature [...]

  13. [...] leaves the larger (and likely ongoing) trimming project, as well as a proper republican theme. The first slimming patch was one of the most satisfying pieces of work I've completed in recent memory and I'd very much [...]

Leave a Reply


You can use the following HTML tags in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>