<?xml version="1.0" encoding="UTF-8"?><!-- version removed from the generator string (Issue #37). -->
<!-- generator="wordpress" -->
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:admin="http://webns.net/mvcb/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:content="http://purl.org/rss/1.0/modules/content/">

<channel>
	<title>Memo</title>
	<link>index.html</link>
	<description>Blog written with WordPress 0.71</description>
	<dc:language>en</dc:language>
	<dc:creator>you@example.com</dc:creator>
	<dc:rights>Copyright 2026</dc:rights>
	<dc:date>2026-05-21T12:39:54</dc:date>
	<admin:generatorAgent rdf:resource="http://wordpress.org/"/><!-- version (?v=) removed (Issue #37). -->
	<admin:errorReportsTo rdf:resource="mailto:you@example.com"/>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

		<item rdf:about="p-2.html&amp;c=1">
		<title>WordPress 0.71、23 年ぶりの Hello World</title>
		<link>p-2.html&amp;c=1</link>
		<dc:date>2026-05-20T04:44:14</dc:date>
		<dc:creator>admin (mailto:&#121;o&#117;&#64;ex&#97;m&#112;&#108;&#101;&#46;com)</dc:creator>
		<dc:subject>General</dc:subject>
		<guid isPermaLink="false">2@index.html</guid>
					<description>

2003 年の WordPress を 2026 年のスタックで動かしてみた週末（が何回かあった）話。2003 年のコードには手を入れない、というルール付きで。



TL;DR

WordPress 最初期のタグ付きリリース WordPress 0.71-gold（2003 年 5 月）— b2/cafelog の流れをくむ、Hello Dolly 以前、テーマ以前、プラグイン以前、いまのループ概念以前のコード — を PHP 8.3 / MySQL 8 / Docker / npm workspaces / PHPStan / Playwright / カスタムブロックエディタ の上で動かしてみた。

ルールは 「2003 年のコードを書き直さない」。動かすのに必要な最小限の変更にとどめて、モダンなものは全部その外側に置く方針で。

ブラウザでそのまま動かせるようにもしておいた。

WordPress Playgroundと同じく、インストール不要・サーバー不要、PHP 8.3 を WebAssembly にコンパイルし、DB はブラウザ内 SQLiteにしている。





このボタンから起動できるので、ぜひWordPress 0.71 を体験してみてほしい。



WordPress 0.71 Now





なぜやってみたのか

WordPress は今月で ...</description>
						<content:encoded><![CDATA[<p><figure class="wp-block-image alignwide size-full"><picture><source srcset="wp-content/uploads/2026/05/0.7_01.png.480.webp 480w, wp-content/uploads/2026/05/0.7_01.png.1024.webp 1024w, wp-content/uploads/2026/05/0.7_01.png.webp 1346w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/0.7_01.png" alt="" class="wp-image-1062265937" style="aspect-ratio:1.814055725676864" width="1346" height="742" fetchpriority="high" decoding="async"/></picture></figure></p>
<p><em>2003 年の WordPress を 2026 年のスタックで動かしてみた週末（が何回かあった）話。2003 年のコードには手を入れない、というルール付きで。</em></p>
<p><hr class="wp-block-separator has-alpha-channel-opacity"/></p>
<p><h2 class="wp-block-heading">TL;DR</h2></p>
<p>WordPress 最初期のタグ付きリリース <strong>WordPress 0.71-gold</strong>（2003 年 5 月）— b2/cafelog の流れをくむ、Hello Dolly 以前、テーマ以前、プラグイン以前、いまのループ概念以前のコード — を <strong>PHP 8.3 / MySQL 8 / Docker / npm workspaces / PHPStan / Playwright / カスタムブロックエディタ</strong> の上で動かしてみた。</p>
<p>ルールは <strong>「2003 年のコードを書き直さない」</strong>。動かすのに必要な最小限の変更にとどめて、モダンなものは全部その外側に置く方針で。</p>
<p>ブラウザでそのまま動かせるようにもしておいた。</p>
<p><a href="https://wordpress.org/playground/" target="_blank" rel="noopener">WordPress Playground</a>と同じく、インストール不要・サーバー不要、PHP 8.3 を WebAssembly にコンパイルし、DB はブラウザ内 SQLiteにしている。</p>
<p><figure class="wp-block-image alignwide size-full has-caption-align-center"><picture><source srcset="wp-content/uploads/2026/05/starting-071-now_02.png.480.webp 480w, wp-content/uploads/2026/05/starting-071-now_02.png.1024.webp 1024w, wp-content/uploads/2026/05/starting-071-now_02.png.webp 1594w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/starting-071-now_02.png" alt="" class="wp-image-2402764951" style="aspect-ratio:1.8238276579728114;object-fit:cover" width="1594" height="874" loading="lazy" decoding="async"/></picture></figure></p>
<p><hr class="wp-block-separator has-alpha-channel-opacity"/></p>
<p>このボタンから起動できるので、ぜひWordPress 0.71 を体験してみてほしい。</p>
<p><div class="wp-block-columns is-not-stacked-on-mobile"><div class="wp-block-column"></div></p>
<p><div class="wp-block-column"><div class="wp-block-buttons"><div class="wp-block-button"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://mt8.github.io/wordpress-0.71-gold/" style="background-color:#1d6995" target="_blank" rel="noopener">WordPress 0.71 Now</a></div></div></div></p>
<p><div class="wp-block-column"></div></div></p>
<p><hr class="wp-block-separator has-alpha-channel-opacity"/></p>
<p><h2 class="wp-block-heading">なぜやってみたのか</h2></p>
<p>WordPress は今月で 23 周年になる。多くの人は 0.71 を実際に触ったことがないと思う。b2/cafelog からの fork、Matt氏による<a href="https://wordpress.org/news/2003/06/wordpress-071-now-available/" target="_blank" rel="noopener">6月9日のアナウンス投稿</a> — 初期 WordPress の話は読み物としては存在するのだが、実際に試せる環境はもうない。</p>
<p>そこで、試せる環境を作ってみたいと考えた。</p>
<p>ただ、PHP 4 時代のコードは PHP 8 では起動しない。</p>
<p><code>ereg()</code> も <code>ext/mysql</code> も PHP4 形式コンストラクタも、もう無い。</p>
<p>MySQL 8 の strict モードも、2003 年の b2/cafelog が書いた SQL は半分がエラーになる。</p>
<p>ログイン画面に辿り着く前に Fatal の壁を乗り越えなければならない。</p>
<p>・・・そりゃそうである。</p>
<p>そこで方針を <strong>「動くのに必要な最小限だけ近代化する。」</strong> とした。</p>
<p>2003 年の表層はそのまま、外側を 2026 年のツールチェーンで包む格好だ。</p>
<p>「何が見えてくるかをやってみたい」というプロジェクトである。</p>
<p><h2 class="wp-block-heading">「コードに触らない」ルール、譲った箇所だけ書いておく</h2></p>
<p><code>src/</code> の中で、どうしても触らざるを得なかったものを並べておく。</p>
<p><ul class="wp-block-list"><li><code>ext/mysql</code> → <code>mysqli</code>（<code>mysql_*</code> 系は PHP 8 にはもう存在しない）</li>
<li>POSIX <code>ereg*</code> → PCRE</li>
<li>PHP4 形式の <code>function ClassName()</code> コンストラクタ → <code>__construct()</code></li>
<li>廃止・改名された PHP 組み込み関数とスーパーグローバル</li>
<li>MySQL 8 の予約語、<code>sql_mode=STRICT_*</code>、文字セット周りの諸々</li>
<li>セキュリティ周り（SQL インジェクション・XSS・CSRF・認証/セッション・アクセス制御・ファイルアップロード・情報漏洩）</li></ul>
<p>最後の項目だけは譲れなかった。</p>
<p>WordPress 0.71 は「プリペアドステートメント」という言葉がまだ一般化していない時代のコードだ。</p>
<p>素のまま公開インターネットに置いたら、重罪に等しい。</p>
<p>そんなわけで、0.71 はあくまで <strong>ローカル限定の成果物</strong> として扱うことにして、公開は別ルートを通すことにした（後述）。</p>
<p>それ以外のモダン要素（Docker・PHPUnit・PHPStan・Playwright・WPCS）は、すべて <code>src/</code> の <strong>外側</strong> に置いた。2003 年のディレクトリは可能な限り 2003 年のまま残してある。</p>
<p>ちなみに PHPStan は level 0 で <strong>エラー0 件</strong>、WPCS（<code>WordPress-Core</code>）も <strong>エラー0 件</strong> で通している。</p>
<p>2003 年の b2/cafelog コードに対して、である。これはちょっと気持ちよかった。</p>
<p><h2 class="wp-block-heading">現在のWordPress風でツール群に命名した</h2></p>
<p><code>wp-cli</code> / <code>wp-env</code> / <code>wp-now</code> を触ったことがあれば、構造はすぐに馴染むと思う。（意図的に模倣してる）</p>
<p><figure class="wp-block-table aligncenter"><table class="has-fixed-layout"><thead><tr><th class="has-text-align-center" data-align="center">2026 の WordPress</th><th class="has-text-align-center" data-align="center">このプロジェクト</th><th>内容</th></tr></thead><tbody><tr><td class="has-text-align-center" data-align="center"><code>wp-cli</code></td><td class="has-text-align-center" data-align="center"><strong><code>071-cli</code></strong></td><td><code>npx 071 &#60;command&#62;</code>、0.71 用 CLI（静的書き出しも含む）</td></tr><tr><td class="has-text-align-center" data-align="center"><code>wp-env</code></td><td class="has-text-align-center" data-align="center"><strong><code>071-env</code></strong></td><td><code>npx 071-env start</code>、PHP 8.3 / MySQL 8 の Docker 環境マネージャ</td></tr><tr><td class="has-text-align-center" data-align="center"><code>wp-now</code> / Playground</td><td class="has-text-align-center" data-align="center"><strong><code>071-now</code></strong></td><td>ブラウザ内 WordPress 0.71、PHP-WASM + SQLite</td></tr></tbody></table></figure></p>
<p><code>npm run setup</code> で一括導入（npm workspaces・ブロックエディタの Vite ビルド・Composer の PHP 開発ツール）、<code>npx 071-env start</code> で Docker 起動。</p>
<p><code>wp-install.php</code> を開くと、2003 年の WordPress インストーラが 2026 年の laptop の PHP 8.3 から配信されている、という光景が拝める。</p>
<p>なかなか不思議な感覚なので、ぜひ一度試してみてほしい。</p>
<p><h2 class="wp-block-heading">071-now（ブラウザで動く 0.71）</h2></p>
<p>この記事で 1 つだけクリックしてもらえるなら、playground のリンクをお願いしたい。</p>
<p>0.71 のサイト全体が <strong>ブラウザのタブの中だけ</strong> で動く。PHP 8.3 を WebAssembly にコンパイルし、DB は SQLite、サーバー側は何もしない。</p>
<p>WordPress Playground と同じ仕組みを、23 年前のコードに向けた格好だ。</p>
<p>正直なところ、0.71 を動かすにはこれが一番安全な方法でもある。</p>
<p>何も外に晒されず、何もサーバーに永続化されない。</p>
<p><strong>好きなだけ壊して、リロードしてやり直してほしい。</strong></p>
<p><div class="wp-block-columns is-not-stacked-on-mobile"><div class="wp-block-column"></div></p>
<p><div class="wp-block-column"><div class="wp-block-buttons alignwide"><div class="wp-block-button"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://mt8.github.io/wordpress-0.71-gold/" style="background-color:#1d6995" target="_blank" rel="noopener">WordPress 0.71 Now</a></div></div></div></p>
<p><div class="wp-block-column"></div></div></p>
<p><h2 class="wp-block-heading">・・・ブロックエディタも乗せてみた</h2></p>
<p>この章は週末を 1 つ消し飛ばした話になる。</p>
<p>PHP8.3とMySQL8でWordPress 0.71が動いたあと、少し欲が出てきてしまった。</p>
<p><strong>「どうせならブロックエディタを組み込んでみよう」</strong></p>
<p>もちろん、WordPress 0.71 に REST API は無い。</p>
<p>テーマシステムも無い。<code>wp_enqueue_script</code> も無い。</p>
<p>現代の Gutenberg は 0.71 に存在しない前提のかたまりで作られているので、そのままの移植は不可能である。</p>
<p>ただし、<code>@wordpress/block-editor</code>（プラグイン本体ではなく、React パッケージの方）を最小限のカスタムバックエンドに乗せて、ブロックマークアップを既存の <code>post_content</code> カラムに保存し、0.71 既存のフロントエンドに描画させる、というのは <strong>できた</strong>。</p>
<p><figure class="wp-block-image alignwide size-full has-caption-align-center"><picture><source srcset="wp-content/uploads/2026/05/block-editor-in-071.png.480.webp 480w, wp-content/uploads/2026/05/block-editor-in-071.png.webp 853w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/block-editor-in-071.png" alt="" class="wp-image-883560303" style="aspect-ratio:1.6186621597580502;object-fit:cover" width="853" height="527" loading="lazy" decoding="async"/></picture><figcaption class="wp-element-caption">まさかのWordPress 0.71に召喚されてしまったブロックエディターさん</figcaption></figure></p>
<p><div style="height:51px" aria-hidden="true" class="wp-block-spacer"></div></p>
<p>従来の <code>b2edit.php</code> エディタはデフォルトのままで、ブロックエディタは実験的な代替手段として横に置いてある（置き換えではない）。</p>
<p>つまり、いまのループ概念より古いコードベースの上で、投稿をブロックで書いて保存すると、0.71 のフロントエンドは何も変わったことに気付かないままレンダリングする、という状態である。</p>
<p>調査メモは <code><a href="https://github.com/mt8/wordpress-0.71-gold/blob/main/docs/gutenberg-investigation.md" target="_blank" rel="noopener">docs/gutenberg-investigation.md</a></code> に書いておいたので、継ぎ目の在り処を確かめたい人はそちらをどうぞ。</p>
<p>※もちろん、この記事は0.71に組み込んだブロックエディターで書いている。</p>
<p><h2 class="wp-block-heading">テストを書く理由 — 古いコードには潜んでいるかわからないから</h2></p>
<p>古いコードは触ってみないとわからない挙動の塊なので、テストを敷いておいた。</p>
<p><ul class="wp-block-list"><li><strong>PHPUnit 94 件</strong> — 2003 年コードのうち単体テスト可能な部分（テキスト整形、同梱の Textile パーサ、日付/URL/数値ヘルパー、<code>get_postdata()</code> / <code>get_userdata()</code> / <code>get_the_category()</code> などの DB 依存ヘルパー）を、偽 <code>$wpdb</code> を使って網羅。</li>
<li><strong>Playwright の E2E</strong> — 実ブラウザから、稼働中の Docker ブログの実管理画面・実フロントエンドを叩く。ログイン、投稿の作成/編集/削除、カテゴリの追加/削除、トップ、単一投稿（<code>?p=</code>）、カテゴリ（<code>?cat=</code>）、月別アーカイブ（<code>?m=</code>）、RSS 2.0 フィード。すべてのページで PHP の <code>Fatal</code> / <code>Warning</code> / <code>Deprecated</code> が <strong>ゼロ</strong> であることを assert している。</li>
<li>E2E が投入するデータは <code>E2E:</code> 接頭辞で識別、名前で削除するため、再実行で既存投稿を消すことはない。</li></ul>
<p><h2 class="wp-block-heading">安全に公開する — 静的書き出し</h2></p>
<p>せっかく動作したら、やっぱりそれを使って公開したいという人が出てくるかもしれない。</p>
<p>そこで、一番安全な方法でWordPress 0.71を公開するフローも用意しておいた。</p>
<p>想定している運用フローは次の通り。</p>
<p><ol class="wp-block-list"><li>ローカルの Docker ブログで投稿を書く。</li>
<li><code>npx 071 export</code> でサイト全体を静的 HTML にダンプ。</li>
<li>静的ファイルだけを公開先（GitHub Pages / S3 / Cloudflare Pages、なんでも）へアップロードする。</li></ol>
<p>公開サーバーは <strong>PHP も MySQL も動かさない</strong> ため、2003 年のコードベースが晒されることはない。</p>
<p>0.71 の出力をインターネット近くに置くなら、これ以外の方法を選ぶ理由が思いつかなかった（し、今でも思いつかない）。</p>
<p>静的ファイルへの書き出しは以下のコマンドで可能だ。</p>
<p><pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color"><code>$ npx 071 export</code></pre>
<p><h2 class="wp-block-heading">触ってみてわかった、WordPress の「歴史」</h2></p>
<p>実際にコードを開いて触ってみて、はっきり感じたことがいくつかある。</p>
<p>まず、0.71 には <strong>固定ページが無い</strong>。投稿とカテゴリがあるだけだ。</p>
<p>コメントとトラックバックはあるが、テーマも、メディアライブラリも、ウィジェットも、プラグインの仕組みも、当然 REST API も、無い。</p>
<p>もっと言うと、「ダッシュボード」もない。/wp-adminにアクセスして表示されるのはエディタと、記事一覧だけだ。</p>
<p><figure class="wp-block-image size-full"><picture><source srcset="wp-content/uploads/2026/05/oldest-editor.png.480.webp 480w, wp-content/uploads/2026/05/oldest-editor.png.webp 941w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/oldest-editor.png" alt="" class="wp-image-3899342439" width="941" height="500" loading="lazy" decoding="async"/></picture></figure></p>
<p>「WordPress は CMS だ」と当たり前のように言われるが、0.71 のコードを読むと、これは <strong>まさしくブログツール</strong> であった、という事実がコードの肌触りとして立ち上がってくる。</p>
<p>そして、そこから <a href="https://w3techs.com/technologies/overview/content_management" target="_blank" rel="noopener">全世界の Web サイトの 40% 以上</a> を支えるところまで育った。</p>
<p>20 数年で、このコードからこのシェアまで。20 年分の歴史の両端が同じ git checkout に入っている状態を手で触っていると、いままで頭で知っていたつもりの「WordPress が大きくなった」という事実が別の解像度で入ってきた。</p>
<p>それからもう 1 つ — <strong>ブロックエディタの組み込みやすさ</strong> にも驚いた。</p>
<p><code><a href="https://www.npmjs.com/package/@wordpress/block-editor?activeTab=readme" target="_blank" rel="noopener">@wordpress/block-editor</a></code> は思っていたよりずっと独立していて、REST API もテーマシステムも前提にしていない。</p>
<p>保存と読み込みさえ繋いでやれば、2003 年のコードベースの上にでも乗ってくれる。</p>
<p>Gutenberg プロジェクトが「単体で外に持ち出せるエディタ」として相当な労力で作り込まれていたことが、ここで初めて腑に落ちた。</p>
<p><h2 class="wp-block-heading">・・・ところで、page-*.php の話を少しだけ</h2></p>
<p>少し前、page-*.php まわりでちょっとした議論があった。</p>
<p>詳しくは ベクトルさん の <a href="https://www.vektor-inc.co.jp/post/why-page-php/" target="_blank" rel="noopener">「なぜ page.php なのか？」</a> と、Capital P の <a href="https://capitalp.jp/2026/04/22/can-i-use-page-x-php/" target="_blank" rel="noopener">「page-*.php は問題なのか？」</a> を読んでもらうのが早い。</p>
<p>0.71 のコードを触りながらあの議論について、ふと考えたことがあったので書き残しておきたい。</p>
<p>冒頭にも書いた通り、0.71 には固定ページが無い。</p>
<p>0.71 はまさにブログツールだった。</p>
<p>そこから WordPress は、いつの間にか「コーポレートサイトから、ECサイト・会員サイト、ランディングページも何でも作れる、無料のサイト構築ツール」として確立されていった。</p>
<p>クライアントワークの現場でも、企業サイトの選択肢としてまず名前が挙がる存在になって久しい。</p>
<p>ただ、その間も WordPress の本質は変わっていないと思う。</p>
<p>WordPress.org が掲げるミッションは &#8220;Democratize Publishing&#8221; — 「出版の民主化」だ。</p>
<p><figure class="wp-block-image alignwide size-full has-caption-align-center"><picture><source srcset="wp-content/uploads/2026/05/democratize-publishing_01.png.480.webp 480w, wp-content/uploads/2026/05/democratize-publishing_01.png.webp 984w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/democratize-publishing_01.png" alt="" class="wp-image-3416975186" width="984" height="462" loading="lazy" decoding="async"/></picture><figcaption class="wp-element-caption"><a href="https://wordpress.org/about/">https://wordpress.org/about/</a> より</figcaption></figure></p>
<p>ブログツールに見えるか、サイト構築ツールに見えるかは、その時々の表層の違いに過ぎなくて、根っこは20 年以上同じ場所にある。</p>
<p>実務に目を向けると、「WordPress を持ちたい」が起点で相談に来てくれるクライアントは、ほぼいない。</p>
<p>クライアントが欲しいのはWebサイトであり、自分でコンテンツを更新できる仕組みであって、WordPress というプロダクトそのものではない。</p>
<p>「自分で更新できる」「自分で発信できる」という、その「出版の民主化」の価値を、クライアントに渡したいと思った時にWordPressを提案したいと考えている。</p>
<p>テンプレートに HTML をベタ書きしたものを納品するというのは、その価値の受け渡しの逆を行く行為だと思っている。</p>
<p>だとすれば、提案する側の責任として、「WordPress とは何なのか」「どんな仕組みで動いているのか」を、もっと知っておきたい。</p>
<p>せっかくオープンソースで、ソースコードまるごとが目の前に置いてあるのだ。</p>
<p><strong>研究することも、遊んでみることも、誰にでも許されている。</strong></p>
<p>今回 0.71 を引っ張り出して 2026 年のスタックに乗せ直してみたのも、その「遊んで学んでみる」の一形態のつもりだ。</p>
<p>どうせ薦めるなら、もっと詳しくなろう。自戒も込めて、そう思っている。</p>
<p><h2 class="wp-block-heading">これは何ではないか</h2></p>
<p>念のため書いておくと、これは本番ソフトウェアではない。</p>
<p>実運用に向けた 0.71 のハードニングでもない。</p>
<p>「0.71 でブログを運用しよう」という提案でもない。</p>
<p>README にも太字で書いてあるが、ここでも繰り返しておく — <strong>やめておいてほしい。</strong></p>
<p><figure class="wp-block-image size-full"><picture><source srcset="wp-content/uploads/2026/05/071-warn.png.480.webp 480w, wp-content/uploads/2026/05/071-warn.png.webp 659w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/071-warn.png" alt="" class="wp-image-1294637751" width="659" height="172" loading="lazy" decoding="async"/></picture></figure></p>
<p>たまたま動かせる考古学プロジェクト、というのが一番近い表現だと思う。</p>
<p>2003 年の WordPress を、その生息環境で読んで、モダンな道具をそっと上に重ねるためのもの。</p>
<p>WordPress 7.0 がリリースされたタイミングで、23 年前の 0.7 を動かしてみた。それだけの話だ。</p>
<p><h2 class="wp-block-heading">試してみてほしい</h2></p>
<p>興味を持ってくれたらぜひ、このボタンから2026年に突如蘇ったWordPress 0.71を体験してみてほしい。</p>
<p><div class="wp-block-columns is-not-stacked-on-mobile"><div class="wp-block-column"></div></p>
<p><div class="wp-block-column"><div class="wp-block-buttons"><div class="wp-block-button"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://mt8.github.io/wordpress-0.71-gold/" style="background-color:#1d6995" target="_blank" rel="noopener">WordPress 0.71 Now</a></div></div></div></p>
<p><div class="wp-block-column"></div></div></p>
<p><h3 class="wp-block-heading">Gitリポジトリ</h3></p>
<p><a href="https://github.com/mt8/wordpress-0.71-gold" target="_blank" rel="noopener">https://github.com/mt8/wordpress-0.71-gold</a></p>
<p>ローカルでの起動方法</p>
<p><pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color"><code>$ git clone https://github.com/mt8/wordpress-0.71-gold<br />
$ cd wordpress-0.71-gold<br />
$ npm i<br />
$ npm run setup<br />
$ npx 071-env start</code></pre>
<p>新品の laptop から 2003 年のインストーラを拝むまで 約3 分。</p>
<p>同じようなことに興味がある人の参考になれば嬉しい。</p>
<p><p class="has-text-align-center has-large-font-size">WordPress、23 歳おめでとう。<br>最初のリリースは、まだ起動するぞ。</p>
]]></content:encoded>
	</item>
			<item rdf:about="p-1.html&amp;c=1">
		<title>Hello World from WordPress 0.71 — 23 Years Later</title>
		<link>p-1.html&amp;c=1</link>
		<dc:date>2026-05-20T04:10:25</dc:date>
		<dc:creator>admin (mailto:&#121;&#111;u&#64;&#101;x&#97;&#109;&#112;le.co&#109;)</dc:creator>
		<dc:subject>General</dc:subject>
		<guid isPermaLink="false">1@index.html</guid>
					<description>

A weekend (well, several weekends) of running 2003's WordPress on a 2026 stack — with one rule: don't rewrite the 2003 code.



TL;DR

I took WordPress 0.71-gold — the very first tagged release of WordPress from May 2003, the descendant of b2/cafelog, predating Hello Dolly, themes, plugins, and the loop as we ...</description>
						<content:encoded><![CDATA[<p><figure class="wp-block-image alignwide size-full"><picture><source srcset="wp-content/uploads/2026/05/0.7_02.png.480.webp 480w, wp-content/uploads/2026/05/0.7_02.png.1024.webp 1024w, wp-content/uploads/2026/05/0.7_02.png.webp 1346w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/0.7_02.png" alt="" class="wp-image-2029035137" style="aspect-ratio:1.814055725676864" width="1346" height="742" fetchpriority="high" decoding="async"/></picture></figure></p>
<p><em>A weekend (well, several weekends) of running 2003&#8217;s WordPress on a 2026 stack — with one rule: don&#8217;t rewrite the 2003 code.</em></p>
<p><hr class="wp-block-separator has-alpha-channel-opacity"/></p>
<p><h2 class="wp-block-heading">TL;DR</h2></p>
<p>I took <strong>WordPress 0.71-gold</strong> — the very first tagged release of WordPress from May 2003, the descendant of b2/cafelog, predating Hello Dolly, themes, plugins, and the loop as we know it — and got it running on <strong>PHP 8.3 / MySQL 8 / Docker / npm workspaces / PHPStan / Playwright / a custom block editor</strong>.</p>
<p>Rule of the game: <strong>don&#8217;t rewrite the 2003 code.</strong> Only change what&#8217;s strictly necessary to make it run. Everything modern lives in the environment around it.</p>
<p>I also made it runnable straight from a browser.</p>
<p>Same idea as <a href="https://wordpress.org/playground/" target="_blank" rel="noopener">WordPress Playground</a> — no install, no server, PHP 8.3 compiled to WebAssembly, with in-browser SQLite as the database.</p>
<p><figure class="wp-block-image alignwide size-full"><picture><source srcset="wp-content/uploads/2026/05/starting-071-now_02.png.480.webp 480w, wp-content/uploads/2026/05/starting-071-now_02.png.1024.webp 1024w, wp-content/uploads/2026/05/starting-071-now_02.png.webp 1594w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/starting-071-now_02.png" alt="" class="wp-image-2402764951" style="aspect-ratio:1.8238276579728114;object-fit:cover" width="1594" height="874" loading="lazy" decoding="async"/></picture></figure></p>
<p><hr class="wp-block-separator has-alpha-channel-opacity"/></p>
<p>The button below boots 0.71 right there in your tab. Please give it a click.</p>
<p><div class="wp-block-columns is-not-stacked-on-mobile"><div class="wp-block-column"></div></p>
<p><div class="wp-block-column"><div class="wp-block-buttons"><div class="wp-block-button"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://mt8.github.io/wordpress-0.71-gold/" style="background-color:#1d6995" target="_blank" rel="noopener">WordPress 0.71 Now</a></div></div></div></p>
<p><div class="wp-block-column"></div></div></p>
<p><hr class="wp-block-separator has-alpha-channel-opacity"/></p>
<p><h2 class="wp-block-heading">Why?</h2></p>
<p>WordPress turns 23 this month. Most people have never actually clicked around in 0.71. The b2/cafelog fork, <a href="https://wordpress.org/news/2003/06/wordpress-071-now-available/" target="_blank" rel="noopener">Matt's June 9th announcement post</a> — the early WordPress story exists as reading material, but there is no environment left where you can actually try it.</p>
<p>So I figured I&#8217;d build that environment.</p>
<p>The problem: PHP 4-era code does not boot on PHP 8.</p>
<p><code>ereg()</code> is gone. <code>ext/mysql</code> is gone. PHP4-style constructors are gone.</p>
<p>MySQL 8&#8217;s strict mode rejects half of what 2003 b2/cafelog wrote.</p>
<p>You hit a wall of fatals before you ever reach a login screen.</p>
<p>…which, fair enough.</p>
<p>So the policy became: <strong>modernize only what&#8217;s needed to boot.</strong></p>
<p>Keep the 2003 surface as-is. Wrap it in a 2026 toolchain.</p>
<p>A &#8220;let&#8217;s see what&#8217;s underneath&#8221; kind of project.</p>
<p><h2 class="wp-block-heading">The &#8220;don&#8217;t touch the code&#8221; rule, with the small print</h2></p>
<p>A short list of what <em>had</em> to change inside <code>src/</code>:</p>
<p><ul class="wp-block-list"><li><code>ext/mysql</code> → <code>mysqli</code> (the <code>mysql_*</code> family simply isn&#8217;t in PHP 8 anymore)</li>
<li>POSIX <code>ereg*</code> → PCRE</li>
<li>PHP4-style <code>function ClassName()</code> constructors → <code>__construct()</code></li>
<li>Removed/renamed PHP built-ins and superglobals</li>
<li>MySQL 8: reserved words, <code>sql_mode=STRICT_*</code>, charset weirdness</li>
<li>Security work (SQLi, XSS, CSRF, auth/session, access control, file upload, info disclosure)</li></ul>
<p>That last one isn&#8217;t negotiable.</p>
<p>WordPress 0.71 was written before &#8220;prepared statement&#8221; was a phrase people said out loud.</p>
<p>Running it as-is on the public internet would be close to a felony.</p>
<p>So 0.71 is treated as a <strong>local-only artifact</strong>, and publishing goes through a different path (more on that later).</p>
<p>Everything else modern (Docker, PHPUnit, PHPStan, Playwright, WPCS) lives <strong>outside</strong> <code>src/</code>. The 2003 directory stays as 2003 as possible.</p>
<p>For what it&#8217;s worth: PHPStan is at level 0 with <strong>0 errors</strong>, WPCS (<code>WordPress-Core</code>) is also at <strong>0 errors</strong>.</p>
<p>On 2003 b2/cafelog code. That felt good.</p>
<p><h2 class="wp-block-heading">Tooling, named in the modern WordPress dialect</h2></p>
<p>If you&#8217;ve used <code>wp-cli</code> / <code>wp-env</code> / <code>wp-now</code>, the layout will feel familiar straight away. (The resemblance is intentional.)</p>
<p><figure class="wp-block-table aligncenter"><table class="has-fixed-layout"><thead><tr><th class="has-text-align-center" data-align="center">Modern WordPress</th><th class="has-text-align-center" data-align="center">This project</th><th>What it does</th></tr></thead><tbody><tr><td class="has-text-align-center" data-align="center"><code>wp-cli</code></td><td class="has-text-align-center" data-align="center"><strong><code>071-cli</code></strong></td><td><code>npx 071 &#60;command&#62;</code> — CLI for 0.71, includes static export</td></tr><tr><td class="has-text-align-center" data-align="center"><code>wp-env</code></td><td class="has-text-align-center" data-align="center"><strong><code>071-env</code></strong></td><td><code>npx 071-env start</code> — PHP 8.3 / MySQL 8 Docker env manager</td></tr><tr><td class="has-text-align-center" data-align="center"><code>wp-now</code> / Playground</td><td class="has-text-align-center" data-align="center"><strong><code>071-now</code></strong></td><td>WordPress 0.71 in your browser — PHP-WASM + SQLite</td></tr></tbody></table></figure></p>
<p><code>npm run setup</code> installs everything in one go (npm workspaces, the block-editor Vite build, the Composer dev tooling). <code>npx 071-env start</code> boots Docker.</p>
<p>Open <code>wp-install.php</code> and you&#8217;re looking at the 2003 WordPress installer, served by PHP 8.3 from a 2026 laptop.</p>
<p>It is a strange feeling, and I do recommend it.</p>
<p><h2 class="wp-block-heading">071-now (0.71 in the browser)</h2></p>
<p>If you only click one thing in this post, please make it the playground link.</p>
<p>The whole 0.71 site runs <strong>inside the browser tab itself</strong>. PHP 8.3 compiled to WebAssembly, SQLite as the database, server side does nothing.</p>
<p>Same machinery as WordPress Playground, pointed at a 23-year-old codebase.</p>
<p>Honestly, this is also the safest possible way to run 0.71.</p>
<p>Nothing exposed, nothing persisted server-side.</p>
<p><strong>Break it as much as you want, refresh, start over.</strong></p>
<p><div class="wp-block-columns"><div class="wp-block-column"></div></p>
<p><div class="wp-block-column"><div class="wp-block-buttons"><div class="wp-block-button"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://mt8.github.io/wordpress-0.71-gold/" style="background-color:#1d6995" target="_blank" rel="noopener">WordPress 0.71 Now</a></div></div></div></p>
<p><div class="wp-block-column"></div></div></p>
<p><h2 class="wp-block-heading">…and a block editor, too</h2></p>
<p>This chapter ate a weekend.</p>
<p>Once 0.71 was booting on PHP 8.3 + MySQL 8, things got a bit greedy.</p>
<p><strong>&#8220;As long as we&#8217;re here, let&#8217;s drop a block editor in.&#8221;</strong></p>
<p>Now — WordPress 0.71 has no REST API.</p>
<p>No theme system. No <code>wp_enqueue_script</code>.</p>
<p>Modern Gutenberg is built on a stack of assumptions that simply don&#8217;t exist in 0.71, so a straight port isn&#8217;t on the table.</p>
<p>But — you <em>can</em> mount <code>@wordpress/block-editor</code> (the React package, not the full plugin) against a minimal custom backend, store block markup in the existing <code>post_content</code> column, and let 0.71&#8217;s existing front end render it. And it <strong>works</strong>.</p>
<p><figure class="wp-block-image alignwide size-full has-caption-align-center"><picture><source srcset="wp-content/uploads/2026/05/block-editor-in-071.png.480.webp 480w, wp-content/uploads/2026/05/block-editor-in-071.png.webp 853w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/block-editor-in-071.png" alt="" class="wp-image-883560303" style="aspect-ratio:1.6186621597580502;object-fit:cover" width="853" height="527" loading="lazy" decoding="async"/></picture><figcaption class="wp-element-caption">Gutenberg, somehow summoned into WordPress 0.71.</figcaption></figure></p>
<p><div style="height:35px" aria-hidden="true" class="wp-block-spacer"></div></p>
<p>The classic <code>b2edit.php</code> editor stays as the default; the block editor sits next to it as an experimental alternative (not a replacement).</p>
<p>So: on a codebase that predates the WordPress <em>loop</em> as we know it, you can write a post in blocks, hit save, and the 0.71 front end renders it without noticing anything has changed.</p>
<p>Investigation notes are in <code><a href="https://github.com/mt8/wordpress-0.71-gold/blob/main/docs/gutenberg-investigation.md" target="_blank" rel="noopener">docs/gutenberg-investigation.md</a></code> if you want to see where the seams are.</p>
<p>※ And yes — this post was written in the block editor mounted on 0.71.</p>
<p><h2 class="wp-block-heading">Tests, because there&#8217;s no telling what&#8217;s hiding in old code</h2></p>
<p>Old code is full of behaviour you only learn by poking. So I laid down a safety net.</p>
<p><ul class="wp-block-list"><li><strong>94 PHPUnit tests</strong> — covering the unit-testable parts of the 2003 code (text formatters, the bundled Textile parser, date/URL/number helpers, and DB-dependent helpers like <code>get_postdata()</code> / <code>get_userdata()</code> / <code>get_the_category()</code>) via a fake <code>$wpdb</code>.</li>
<li><strong>Playwright E2E</strong> — drives the running Docker blog from a real browser. Log in, create/edit/delete a post, add/delete a category, then hit the home page, single post (<code>?p=</code>), category (<code>?cat=</code>), monthly archive (<code>?m=</code>), and the RSS 2.0 feed. Every page is asserted to produce <strong>zero</strong> PHP <code>Fatal</code> / <code>Warning</code> / <code>Deprecated</code> output.</li>
<li>Seeded E2E data is prefixed <code>E2E:</code> and removed by name, so the suite is safe to re-run without touching your own posts.</li></ul>
<p><h2 class="wp-block-heading">Publishing safely — static export</h2></p>
<p>Once it works, some people will inevitably want to actually publish with it.</p>
<p>So I built in the safest possible publishing flow for WordPress 0.71.</p>
<p>The intended workflow:</p>
<p><ol class="wp-block-list"><li>Write posts in the local Docker blog.</li>
<li><code>npx 071 export</code> dumps the whole site to static HTML.</li>
<li>Upload only the static files anywhere — GitHub Pages, S3, Cloudflare Pages, whatever.</li></ol>
<p>The public server runs <strong>no PHP and no MySQL</strong>, so the 2003 codebase is never exposed.</p>
<p>If 0.71 output is going anywhere near the internet, I couldn&#8217;t think of any other reasonable way to do it (and still can&#8217;t).</p>
<p>The static export is just one command:</p>
<p><pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color"><code>$ npx 071 export</code></pre>
<p><h2 class="wp-block-heading">What touching the code taught me about WordPress&#8217;s history</h2></p>
<p>A few things became unavoidable once the code was actually in my hands.</p>
<p>First: <strong>0.71 has no pages.</strong> Just posts and categories.</p>
<p>Comments and trackbacks exist — but there are no themes, no media library, no widgets, no plugin system, and obviously no REST API.</p>
<p>And going further: <strong>there&#8217;s no &#8220;Dashboard.&#8221;</strong> Hit <code>/wp-admin</code> and what you get is the editor and a post list. That&#8217;s all there is.</p>
<p><figure class="wp-block-image size-full"><picture><source srcset="wp-content/uploads/2026/05/oldest-editor.png.480.webp 480w, wp-content/uploads/2026/05/oldest-editor.png.webp 941w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/oldest-editor.png" alt="" class="wp-image-3899342439" width="941" height="500" loading="lazy" decoding="async"/></picture></figure></p>
<p>&#8220;WordPress is a CMS&#8221; is something we say automatically. Read the 0.71 code, though, and the truth rises right up off the page: this was, very precisely, a <strong>blog tool</strong>.</p>
<p>And from there, it grew to power <a href="https://w3techs.com/technologies/overview/content_management" target="_blank" rel="noopener">over 40% of the entire web</a>.</p>
<p>Twenty-something years from that codebase to that share. With both ends of that arc sitting in the same git checkout under my hand, the abstract fact of &#8220;WordPress got big&#8221; landed at a completely different resolution than I&#8217;d held it in my head before.</p>
<p>The other surprise: <strong>how cleanly the block editor drops in.</strong></p>
<p><code><a href="https://www.npmjs.com/package/@wordpress/block-editor?activeTab=readme" target="_blank" rel="noopener">@wordpress/block-editor</a></code> turned out to be far more standalone than I&#8217;d assumed. It doesn&#8217;t insist on the REST API. It doesn&#8217;t insist on the theme system.</p>
<p>Wire up save and load against any backend you&#8217;ve got, and it will happily run — even on top of a 2003 codebase.</p>
<p>The amount of work the Gutenberg project must have put into making the editor portable like that — that only really landed for me here, on the other side of the experiment.</p>
<p><h2 class="wp-block-heading">Democratize Publishing</h2></p>
<p>There&#8217;s something else this project pushed me to revisit.</p>
<p>0.71 has no pages, as I said. 0.71 was, very precisely, a blog tool.</p>
<p>From there, WordPress quietly grew into &#8220;the free thing you build corporate sites, e-commerce sites, membership sites, and landing pages with.&#8221;</p>
<p>Even in client work, it has been a long time since WordPress was anything but the first name on the table when someone needs a company site.</p>
<p>But underneath, I don&#8217;t think WordPress&#8217;s essence has actually changed.</p>
<p>WordPress.org&#8217;s stated mission is <strong>&#8220;Democratize Publishing&#8221;</strong> — and I think that&#8217;s still the whole game.</p>
<p><figure class="wp-block-image alignwide size-full has-caption-align-center"><picture><source srcset="wp-content/uploads/2026/05/democratize-publishing_01.png.480.webp 480w, wp-content/uploads/2026/05/democratize-publishing_01.png.webp 984w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/democratize-publishing_01.png" alt="" class="wp-image-3416975186" width="984" height="462" loading="lazy" decoding="async"/></picture><figcaption class="wp-element-caption">via <a href="https://wordpress.org/about/">wordpress.org/about</a></figcaption></figure></p>
<p><div style="height:35px" aria-hidden="true" class="wp-block-spacer"></div></p>
<p>Whether WordPress looks like a blog tool or a site-building tool in any given decade is a surface difference. The root has been in the same place for 20+ years.</p>
<p>In day-to-day client work, almost nobody walks in saying &#8220;I want a WordPress.&#8221;</p>
<p>What clients actually want is a website — something they can update themselves. WordPress, the product, is never the goal.</p>
<p>The reason we still propose WordPress is that we want to hand them that <em>&#8220;you can publish on your own&#8221;</em> — that little piece of &#8220;Democratize Publishing.&#8221; That&#8217;s the actual value being transferred.</p>
<p>And because that value lives in the open source itself, getting more familiar with the codebase — reading it, poking it, breaking it — is part of how we get better at the job. The whole thing is sitting right there in public.</p>
<p><strong>Studying it, playing with it — both are permitted, for anyone.</strong></p>
<p>Pulling 0.71 out and dropping it onto a 2026 stack was, in part, just my own form of &#8220;play and learn.&#8221;</p>
<p>If we&#8217;re going to recommend WordPress, we may as well know it well. Saying that as much to myself as to anyone else.</p>
<p><h2 class="wp-block-heading">What this isn&#8217;t</h2></p>
<p>For the record: this is not production software.</p>
<p>It is not a hardening of 0.71 for real use.</p>
<p>It is not a &#8220;you should run your blog on 0.71&Prime; pitch.</p>
<p>The README says this in bold, and I&#8217;ll say it again here — <strong>please don&#8217;t.</strong></p>
<p><figure class="wp-block-image size-full"><picture><source srcset="wp-content/uploads/2026/05/071-warn.png.480.webp 480w, wp-content/uploads/2026/05/071-warn.png.webp 659w" type="image/webp" sizes="(max-width: 782px) 100vw, 600px" /><img src="wp-content/uploads/2026/05/071-warn.png" alt="" class="wp-image-1294637751" width="659" height="172" loading="lazy" decoding="async"/></picture></figure></p>
<p>The closest honest description is: an archaeology project that happens to be runnable.</p>
<p>A way to read 2003 WordPress in its own habitat, with modern tooling resting gently on top.</p>
<p>Done with 0.7 on WordPress 7.0&#8217;s release day, twenty-three years later. That&#8217;s all this really is.</p>
<p><h2 class="wp-block-heading">Try it</h2></p>
<p>If any of this sounds interesting, please give the button a click and meet WordPress 0.71, unexpectedly back from 2003, running in 2026.</p>
<p><div class="wp-block-columns is-not-stacked-on-mobile"><div class="wp-block-column"></div></p>
<p><div class="wp-block-column"><div class="wp-block-buttons"><div class="wp-block-button"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://mt8.github.io/wordpress-0.71-gold/" style="background-color:#1d6995" target="_blank" rel="noopener">WordPress 0.71 Now</a></div></div></div></p>
<p><div class="wp-block-column"></div></div></p>
<p><h3 class="wp-block-heading">Repo</h3></p>
<p><a href="https://github.com/mt8/wordpress-0.71-gold" target="_blank" rel="noopener">https://github.com/mt8/wordpress-0.71-gold</a></p>
<p>Local setup:</p>
<p><pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color"><code>$ git clone https://github.com/mt8/wordpress-0.71-gold<br />
$ cd wordpress-0.71-gold<br />
$ npm i<br />
$ npm run setup<br />
$ npx 071-env start</code></pre>
<p>About 3 minutes from a fresh laptop to staring at the 2003 installer.</p>
<p>Hope it&#8217;s useful for anyone working on something similar.</p>
<p><p class="has-text-align-center has-large-font-size">Happy 23rd, WordPress.<br>The first release still boots.</p>
]]></content:encoded>
	</item>
		</channel>
</rss>