Skip to content
lab-005WIP

Elephc × WordPress

WordPress 7.1 compiled ahead of time with Elephc: the original bootstrap and block renderer serve SQLite-backed posts from a native executable.

question
Can WordPress run as a native binary?
stack
Elephc, WordPress 7.1, Gutenberg, SQLite
started
2026
status
WIP

Overview

This port starts from the complete WordPress 7.1.4 release, 3,782 files of which 1,512 are PHP, and compiles its bootstrap and content renderer with Elephc into a native executable. Every change the compiler needs is a full-file patch: 639 compatibility rewrites and 464 adaptations to a finite profile, recorded in a manifest with the original, patch and resulting checksums.

The web binary runs WordPress's own wp-load.php and wp-settings.php, inserts three demo posts into an in-memory SQLite database and lets Gutenberg's Latest Posts block list them; each link loads the article with get_post() and renders it with do_blocks(). Every page is compared with original PHP. The CLI binary takes a block document and returns the rendered HTML as JSON.

The scale is part of the result: the recorded web build took about 36 minutes and 35 GiB of compiler memory, and produced a 2.22 GB executable. The verified path exercises about 2% of WordPress's PHP lines. Theme routing, administration, authentication, plugins and a persistent database remain outside the profile, and calls to unsupported APIs stop at explicit boundaries.

Highlights

  • The complete WordPress 7.1.4 archive, verified file by file before patching
  • 1,103 full-file patches, each pinned to its original and patched checksums
  • The native CLI registers 116 core blocks and matches original PHP
  • Latest Posts and articles served from SQLite, compared with PHP page by page
  • 230,504 control comparisons passed across 47 native groups