Machine Translation
This page was automatically translated from the Japanese original. Please refer to the original for authoritative technical phrasing.

Record of the large-scale overhaul of taksas.net, migrating from WordPress to Astro and Cloudflare Workers Static Assets

Author: taksasPublished: blogMarkdown

This site, which was launched with WordPress in 2021, was completely revamped in November 2026 into a static configuration using Astro and Cloudflare Workers Static Assets.

In April 2023,I wrote an article about moving the hosting from GCP to the OCI free tier,but this time, I have gone beyond just migrating the server and have abolished WordPress itself.
On the premise of maintaining the free tier (important!) and compatibility with existing permalinks,the main focus was modernizing the design, adding a 3D background, and implementing automatic translation for 11 languages.

Challenges faced before the renovation

The configuration before migration was a typical LAMP environment running Apache, MySQL, and WordPress on an Oracle Cloud Infrastructure (OCI) free tier VM (E2).
As operations continued, three major burdens became apparent.

First: The burden of maintenance and security
Although the site primarily consisted of static articles and work introductions, it constantly occupied one VM, requiring continuous updates for the OS, Apache, PHP, MySQL, WordPress core, and multiple plugins.

Dealing with the vulnerabilities that frequently emerge lately, and relying on unattended automatic updates and reboots in the middle of the night, had become a concern that was difficult to ignore.

Second: Various issues that had accumulated during long-term operation
While skillfully hiding them so visitors wouldn't notice, mysterious errors gradually appeared, storage filled up, backup file sizes increased, and response times felt slower than immediately after construction...

Many issues were also discovered during the inventory process at the time of migration.

There was also significant dependency on plugins and WordPress-specific behaviors.
Internal links to the old version were _OLD_V1 written in uppercase, and were barely working due to WordPress's case-insensitive routing.

The contact form (Contact Form 7), PDF/PPTX embed shortcodes, internal oEmbed iframes (8 items), and the full-screen loading animation (LoftLoader) were also dependent on PHP and plugins.

The published media consisted of 1,765 files (86.79 MiB), but according to Gemini 4 Neon, the server also contained a mix of non-public data such as plugin caches, old backups, key-related directories, 8 draft posts, 1 draft page, and 132 revisions...

Third: Outdated design and browsing experience
In rebuilding the appearance, I wanted to avoidthe uniform templates that seem to be rampant lately,as if mass-produced by generative AI.
The starting point for this renovation is to create a rich interface while making use of the sea and mountain motifs from the site icon (Mountain V2).

Renovation Policy

ItemBefore Renovation (WordPress on OCI)After Renovation (Astro + Cloudflare Workers Static Assets)
Delivery MethodRunning PHP and MySQL constantly on an OCI free tier VMStatically generating from a single GitHub repository and delivering via the free tier
URL and Original DocumentsWordPress Dynamic Routing and DB ManagementMaintain existing regular URLs, original image byte sequences, JSON API, and RSS
UI and PresentationExisting Theme (Inspiro) and LoftLoaderMeta Astryx, React 19 (only where necessary), and continuous 3D space
Multilingual SupportOnly certain handwritten English pagesMaintain Japanese original and existing English; automatic translation of differences for 10 languages
Search and LLM SupportWordPress standard search onlyPagefind static search; all pages .md Output:llms.txt
Verification and PublicationManual verification and direct server operationcheck・build・verify・Playwright E2E / Git integration automatic deployment

To survive on the free tier,/archives/<id> The article URL was published with a typo. /watchwaterejecterthe English page I had prepared by hand /interlocking-batterysaver-by-wi-fi_en, a public JSON API referenced by external apps (/wp-json/acf/v3/pages/1152)、RSS(/feed), and I carried over the monitoring iframes (7 items) using Google Sheets as they were.

On the other hand, although it existed by default as a WordPress feature, there were zero approved comments across all pages, so I have removed the comment submission form and CAPTCHA.
PHP email sending via Contact Form 7 will also be discontinued,/contact It has been changed to a static page containing Japanese and English guidance and external links.

We proceeded with the new introduction of a headless CMS and a policy of not implementing SPA-type fallbacks that return HTTP 200 for non-existent URLs.

Pre-work inventory

The free tier of Cloudflare Workers Static Assets includesUp to 20,000 files in total, up to 25 MiB per file, no limit on the number of static requestsThere is a condition.

Before migration, I measured the public media; the target consisted of 1,765 files totaling 86.79 MiB, and the largest file appeared to be /wp-content/uploads/2024/02/Barcode-Decoder-PP.pptx 1.95 MiB... (according to Neon's investigation)
Since there were zero video files, I determined that they could be moved to static delivery without worrying about the 25 MiB limit or HTTP 206 Range requests.

New technical configuration

The new configuration generates a static site using Astro 7 (7.4.13) and TypeScript (5.9.3) based on a single GitHub repository, and delivers it to Cloudflare Workers Static Assets.
wrangler.jsonc It does not include Worker execution code (main) anddist/ is dedicated solely to the static delivery of

. For the UI and design system, I adopted Meta's Astryx (@astryxdesign/core).
Theme CSS is pre-generated at build time, and React 19 is limited to only a few components that require interactivity, such as the header, search dialog, and announcement banner.

Since the body of articles and fixed pages are all output as pure Astro HTML,the full text can be read with just the initial HTML even in environments where JavaScript is disabled or by crawlers. Excellent.

I combined Shiki for code highlighting, PhotoSwipe for image enlargement, and Pagefind, which uses a static index, for site search.

All peripheral functions that were dependent on WordPress have also been replaced with a static configuration.

Organized embedded content as well.
The monitoring page is an unnecessary inline <script> and hide about:blank remove, 7 Google Sheets <iframe> and minimal CSP frame-src only leaves behind.

The shortcodes for PDF and PPTX have been converted to viewing iframes and original file download links, and the 8 internal oEmbeds have been converted to regular static link cards.

Continuous 3D Space and Design Refresh

The part that involved the most trial and error this time was the design and performance tuning of the 3D background space that continues across pages.

Astro's ClientRouter and transition:persist By combining them, you can maintain the Three.js canvas without destroying it when following internal links.
Since the URLs switch to actual static HTML pages for each page, they display without issue even when accessed directly from SNS or search results, while allowing for an experience where the camera moves smoothly through a single 3D space during navigation within the site.

Across the entire site,unified with origami-style terrain expressionsand rebuilt.
We also added an introductory animation where the user descends from the distant sky only when visiting for the first time from an external domain (document.referrer determined by [condition]), and adjusted it so as not to disrupt the tempo of navigation within the site.

These were live-coded, but during testing on actual devices, bugs that are easily overlooked during desktop-only development—such as double-firing of screen transitions, slight gaps at the top of the header, and misalignment of the loading bar position—were discovered one after another.

Since the background 3D constantly running the device's GPU leads to battery consumption and sluggish performance, I also worked hard to reduce rendering load. Gemini did it.

ヘッダー上端の隙間を解消し、上端へ移した遷移ローディングバーの確認スクリーンショット
Screenshot confirming the fix for the gap at the top of the header and the transition loading bar moved to the top

By dropping the rendering to approximately 30fps when static,it is set to draw at the maximum rate only during page transitions, pointer/scroll following, and theme switching.
A limit of approximately 3.7 megapixels was set for the rendering resolution, and control was implemented to stepwise decrease the DPR on devices experiencing continuous frame drops.

The background sky is drawn last with an opaque pass, and shader calculations for areas hidden by terrain or the sea surface are skipped using early-Z, and
Additionally, I have implemented opacity for the mesh after transition completion, splitting the sea surface into an opaque center and a transparent outer edge, excluding triangles hidden below the water surface,powerPreference: 'default' specification, stencil buffer disabling, and shader pre-compilation during idle time.

Free tier 11-language automatic translation and LLM/search support

In conjunction with the renewal, I have incorporated support for a total of 11 languages, adding 10 languages (English, Simplified Chinese, Spanish, Arabic, Hindi, Russian, French, Portuguese, Indonesian, Bengali) to the original Japanese text.
For Arabic (ar) with dir="rtl" and CSS logical properties, I implemented right-to-left typesetting, but since I cannot read it, I am unsure if it is correct...

For the translation engine,the Cloudflare Workers AI free tier (10,000 Neurons per day)was used, with restrictions implemented on the code side to prevent switching to paid models outside the allowlist.
As a result of verification, the model settled on @cf/google/gemma-4-26b-a4b-it with reasoning disabled.

Bugs encountered during translation operations and countermeasures

When actually running the automatic translation for 10 languages,frequent bugs occurred。

Divide the HTML into semantic blocks, and [extract/process] URLs, paths, and version numbers [[P0]] It was being escaped into placeholders like, but a common LLM issue occurred where the model broke the parentheses or dropped the symbols themselves.
Normalization of parentheses, retry upon dropout, glossary (glossary.jsonAdd verification of protection to prevent it.

I was using simple regular expressions to filter out dangerous HTML, but it triggered a false positive on a code block within a technical article (since it was a security engineer's site...).
cheerio and it has been resolved by switching to a method of directly inspecting DOM attributes.

Output for LLMs and search engines

In parallel with multilingualization, we are also preparing outputs for LLMs and search engines, which are a must (?) for modern websites.

In all articles, static pages, and translation pagesMarkdown version of the same path (*.md)and <link rel="alternate" type="text/markdown"> output,/llms.txt and by language /{lang}/llms.txt, mutual hreflang、sitemap.xmlWe are configuring it to automatically generate JSON-LD structured data and Pagefind's language-specific static search during the build process.

ビルド時に生成した静的インデックスで動作するPagefind検索ダイアログ
Pagefind search dialog operating with the static index generated at build time (confirmation screen from initial development)