HIRO GEAR
自作インフラ Astro WordPress Web開発

Mon passage complet de WordPress à Astro : abandonner PHP et les CMS lourds pour un blog ultra-léger co-créé avec l'IA

Mon passage complet de WordPress à Astro : abandonner PHP et les CMS lourds pour un blog ultra-léger co-créé avec l'IA

Over the years, I have managed my blog using WordPress on a Docker container running on my home Raspberry Pi server.

However, as the site grew in scale and its integration with Obsidian (the flagship for my daily intellectual production) and custom AI agents advanced, the “sense of unease” and “operational stress” associated with traditional, heavy dynamic CMS platforms became unbearable.

This time, I have completely graduated from WordPress and fully migrated to Astro, a modern Static Site Generator (SSG).

In this article, I will document why I abandoned the world’s most popular WordPress, what challenges Astro solved for me, and outline the new blog operation design for co-creating with AI agents.


1. Three Fundamental Reasons for Graduating from WordPress

WordPress is wonderful software used worldwide, but for me, who wants to smartly record and broadcast my thoughts and skills, it gradually became over-specified and a burden.

① “Structural Vulnerability Anxiety” of PHP and Databases

WordPress is a “dynamic CMS” where PHP runs on every access, pulling article data from the MariaDB/MySQL database to assemble HTML. Furthermore, since the admin panel (/wp-login.php) is exposed externally, it continues to be targeted by brute-force attacks (dictionary attacks) and vulnerability scans from bots around the world.

I just wanted to run my personal blog peacefully, yet being chased by regular plugin updates, core updates, and database integrity checks was bad for mental health. The thought that “if we simply don’t run PHP or DB on the server, wouldn’t the gap for attacks disappear?” became stronger and stronger.

② Complexity of Backups and Difficulty of Restoration

Backing up WordPress is surprisingly troublesome.

  • MySQL database dump (.sql) containing articles and settings
  • Uploaded image groups (/wp-content/uploads/)

These two streams must be saved while maintaining consistency, and restoring the system in case of a server crash is laborious. It was far from the simplicity of “copy-pasting a few files to restore everything.”

③ Realization that “This Level of Complexity is Unnecessary”

The complex styling of the Block Editor (Gutenberg), heavy JavaScript, and bloated CSS. What I needed was “minimalist beauty that can be read instantly without stress on both PC and smartphone,” not a forest of luxurious plugins.


2. Why Astro? — Minimal HTML/CSS and Overwhelming Freedom

There are many choices for Static Site Generators such as Hugo or Next.js, but the deciding factors for choosing Astro were the following three points.

① “Grow to Your Own Taste” with Pure HTML/CSS/Tailwind

Many CMSs and modern frontends are often bound by framework-specific black-box practices. However, Astro allows you to assemble components using the intuition of raw HTML and CSS (Tailwind CSS). I was able to implement my unique aesthetic—such as a “warm background feeling like washi paper” or an “elegant grid like a celestial star chart”—exactly as I wished with minimal CSS.

② “Substantially Zero Client-Side JS” via Island Architecture

Astro’s biggest feature is that it does not send any client-side JavaScript to the browser by default. Only pure HTML and CSS are generated. Therefore, the first page load and screen transitions complete at an otherworldly speed of 1ms~5ms (felt as zero seconds).

③ Robust Type Safety via Markdown / Content Collections

All articles are managed as plain Markdown files (.md) locally. With TypeScript schema definitions (Zod), the format of tags, publication dates, and missing specifications for featured images are automatically verified during the build process, ensuring article quality is always high.


3. The New Architecture Built for Deployment (Cloudflare Tunnel × Nginx Static Delivery)

The overall configuration for public deployment built upon migration is as follows.

flowchart TD
    subgraph Client ["Reader / Viewing Environment"]
        Browser["Browser (PC / Smartphone)"]
    end

    subgraph Raspi ["Home Raspberry Pi Server"]
        Nginx["Nginx (Port 80)"]
        Dist["/data/hiro-gear-astro/dist/<br>(Ultra-lightweight static HTML & assets)"]
        Tunnel["Cloudflare Tunnel (cloudflared)"]
    end

    Browser -->|https://hiro-gear.com| CF["Cloudflare Edge"]
    CF <-->|Encrypted Tunnel| Tunnel
    Tunnel <-->|Local Forwarding| Nginx
    Nginx -->|Zero-overhead direct delivery| Dist
  • Complete static delivery without even needing Node.js to be resident: We adopted a configuration where Nginx directly delivers the static file group generated by npm run build. This results in 0% CPU load and 0MB memory consumption for blog delivery. By stopping the WordPress container and database, approximately 1GB of free memory was instantly released on the Raspberry Pi.

4. New Operation: Teaching “Blog Management Rules” to AI Agents

The biggest harvest from this migration was establishing a “blog operation flow co-created with AI agents.”

We stopped the style of humans clicking around in the WordPress admin panel and instead thoroughly taught the following four major rules as skills (knowledge) to the AI agent.

Rule ItemSpecific Regulations
Unified TaggingAbolished the traditional “Categories” and unified them into 4 axes directly connected to my vision (Custom Infrastructure / AI & Agents / Planner / Intellectual Production / Life & Daily Work) + individual technology tags (2-3 items).
Structured Table of ContentsLimited to two levels of H2/H3. Headings are constructed with specific phrases that convey the main points.
Thumbnail Unification16:9 horizontal wide format. Fixed a prompt type maintaining a worldview of Washi × Celestial Star Chart × Tech, and no text is included within images.
Privacy FirewallExif location information in images is completely stripped using Pillow. Exposure of license plates, living areas, home internal IPs, and equipment names is strictly prohibited.

By creating draft articles from daily thought notes (Obsidian) and instructing the AI agent to “edit this article, generate an image for the featured image, and publish it,” a system was established where highest-quality articles fully complying with rules are deployed in just a few minutes.


5. Dramatic Evolution of Backup Plan — Into a World Where “Git is Everything”

The backup that worried my head during the WordPress era has become unbelievably simple.

  • Git Repository is the Backup Itself: Article content (Markdown), image assets, site design code, and build settings are all consolidated in a single Git repository (/data/hiro-gear-astro).
  • Double Backup to Another Machine with One Command: After writing an article, just git commit and git push to the development workstation.
  • Disaster Recovery Restorable in 1 Minute: Even if the Raspberry Pi is physically completely lost, cloning with git clone on new hardware and running npm run build brings back a 100% identical blog in just 1 minute. The days of worrying about database restoration and permission adjustments are completely gone.

6. Conclusion: Subtraction Created a Place to Focus on Thought

The migration from WordPress to Astro was not merely switching web frameworks, but rather “subtraction to let go of unnecessary complexity and focus on truly important content and contemplation.”

  • Security: No PHP, no DB, no login screen means zero anxiety about vulnerabilities.
  • Performance: Page display is in milliseconds. Extremely comfortable on both mobile and PC.
  • Maintainability: Complete with just files and Git; backup and restoration are incredibly easy.
  • Scalability: Linked with AI agents, a writing and publishing flow directly connected from the planner (Obsidian) is complete.

For those who think “I want a simple blog that I can control on my own server” or “I want to create a smart exit for intellectual production suitable for the AI era,” I am convinced that a static site configuration using Astro and Markdown is undoubtedly one of the most beautiful and strongest choices available right now.